Questions tagged [applicationcontext]

The Spring `ApplicationContext` class

The Spring ApplicationContext class is the central interface to provide configuration to any Spring application.

869 questions
0
votes
1 answer

Spring XML Initialization order and Bean overridden

I am trying to understand a web system using spring and I can not debug it. Now I am confused by the order of the XML initialization. Support I have an web.xml which is like this: contextConfigLocation
tousinn
  • 73
  • 2
  • 3
  • 11
0
votes
1 answer

Deploy Spring and Jersey App with JavaConfig on Grizzly

I am trying to make this run for days now and I can't figure out how to do it. Perhaps someone else has an idea or has done this already? I want to deploy my application on a grizzly embedded server. I configured my Spring application using…
evermean
  • 1,255
  • 21
  • 49
0
votes
0 answers

Bad injection of maven properties in spring application context

I am trying to set up an activeMQ broker and apply it the following policyEntry:
Antonio Acevedo
  • 1,480
  • 3
  • 21
  • 39
0
votes
1 answer

Why tomcat's -D parameter not accepted in applicationContext.xml?

There are two war files in tomcat's webapp directory. Passing -DAPP_NAME=XYZ as VM parameter. And trying to read the value in applicationContext.xml with syntax ${APP_NAME}. One webapp substituting the value and the other not.
0
votes
1 answer

load AnnotationConfigApplicationContext from another project[Eclipse]

I have a project A which uses AnnotationConfigApplicationContext to define the application context like: private static AnnotationConfigApplicationContext getApplicationContext() { if (applicationContext == null) { applicationContext =…
CuriousCoder
  • 1,582
  • 5
  • 28
  • 55
0
votes
3 answers

Not able to wire entityManager with applicationContext bean

I am facing a problem to wire entity manager with the bean present in application context. whenever i do some operation it gives NullPointerException. this is my applicationContext.xml file
Ajit Singh
  • 2,436
  • 23
  • 27
0
votes
3 answers

What is wrong with this use of Application context in Android?

I abstract my model like this:first there is a class UserInfo which holds user information: public class UserInfo extends Application{ private int userid; public void setUserId(int id) { userid=id; } public int getUserId() { return…
huaxz1986
  • 135
  • 1
  • 1
  • 6
0
votes
1 answer

Setting Spring bean property value in ApplicationContext without using properties file

I want to change the value of my bean property in my application context without reading from properties file. I will get property values set in the properties object. properties object will be passed to my api while calling api interface.
Nep Tech
  • 1
  • 1
0
votes
1 answer

How can I programatically add a beanPostProcessor to a ClassPathXmlApplicationContext?

There's a way to programatically add a beanPostProcessor to a ClassPathXmlApplicationContext ? I can do it declaratively in the xml, but apparently there's no way to add programatically. My processor must do something like if my bean is a…
0
votes
1 answer

Error in Spring : org.springframework.beans.factory.NoSuchBeanDefinitionException:

I am facing this error in integration of spring security : org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined This is my pom.xml
Wijden
  • 511
  • 6
  • 11
  • 23
0
votes
2 answers

Set object in application context in spring mvc

I have a utility class which I want to initialize when the application starts in Spring MVC. So I am implementing InitializingBean. Now I have to create an object for the same and save it in Application scope so that I can access the same instance…
divinedragon
  • 5,105
  • 13
  • 50
  • 97
0
votes
1 answer

Share One common variable inside my Swing Application

I want to share One common variable inside my Swing Application throughout the application life cycle. It should be same Application Context in Servlets .What are the ways i can achieve it?
Kuldeep
  • 13
  • 1
  • 3
0
votes
1 answer

How to programatically add beans in Java to the app-context.xml in Spring?

I was following this tutorial http://java-diaries.blogspot.com/2011/03/get-started-with-spring-jms-using.html and I do not understand why for an @Service and an @Autowired annotation you need to explicitly create beans in the app-context.xml but for…
jon
  • 253
  • 4
  • 8
  • 16
0
votes
2 answers

spring-security.xml declaration strange behaviour

So if i do this: spring org.springframework.web.servlet.DispatcherServlet contextConfigLocation
0
votes
1 answer

Error creating bean with name 'sessionFactory' - Spring/Hibernate

I'm trying to make Spring and Hibernate 4 work together but those errors appeared : log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. Mar 15,…
dropuse
  • 1
  • 1
  • 1