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
0 answers

How to use the appicationcontextaware in java class

I need to load the applicationcontext in java class in which the applicationcontextaware bean is defined. I need to access the other beans inside the applicationcontext.xml using the applicationcontextaware. I dont want to load the context using…
Jessie
  • 963
  • 5
  • 16
  • 26
0
votes
2 answers

How to change application context

To begin with, I have to say that I'm totally new in spring, my first task was to change application context. I think it should be placed in *.xml files, but can' find the field. I've google it as well, but didn' find any solution. Probably poor…
iie
  • 501
  • 4
  • 8
  • 26
0
votes
1 answer

window scope in spring?

i was wondering about the spring scope equivalent to window scope ? according to the documentation here http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch04s04.html i couldn't find any, so if there's a custom…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
0
votes
2 answers

Queries related to beans and application Context.

I am developing a web application using Spring MVC. I want to ask certain things related to beans file and Application Context. I have classes which have objects. Let's say i have an employee, Product, project Classes with some objects in that…
Shantanu Tomar
  • 1,572
  • 7
  • 38
  • 64
-1
votes
1 answer

ApplicationContextAware is not working in spring-boot

I'm trying to use Brave Tracer Inside the non component class. This code is working fine in main project, setting context and getting context both are printing. But when I generate jar file and import it to different project 2 and run it, Only…
-1
votes
1 answer

[/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: java/security/cert/X509Certificate

I've been stuck on this a little while. War file compiles fine, classes seem to be there, not sure what is causing this issue. The application will not run and returns a 404 error. It started when I tried updating struts and spring .jar files. …
-1
votes
1 answer

Error creating bean defined in ApplicationContext.xml

I am porting Spring( v.4.3.2) application from Tomcat7 to Tomcat9. I am running Tomcat as a service on Windows box. in my ApplicationContext.xml I have several Beans profiles defined and I also have bean definitions outside of profiles :
vs777
  • 564
  • 2
  • 11
  • 24
-1
votes
1 answer

Swift getting Nil when attempting to get value

Im not sure why i am getting this nil error on optional when attempting to print. Can somebody provide any input? It doesn't make sense that I am able to output the value from the aplicationContext, however when I attempt to get value from…
-1
votes
1 answer

What is the best way to read application-context.xml in Spring MVC application, Is it by adding in init-param tag or by adding in context-param tag?

In few applications I see application-context file being read via init-param and in few via context-param. My intention is to know which one to use when.
-1
votes
2 answers

Spring boot adding and removing singleton at runtime

With reference with below links, i want my spring boot app to replace bean at runtime in applicationcontext. Add Bean Remove Bean Below is my try, MainClass.java @SpringBootApplication public class MainClass { public static void main(String[] args)…
Aditya Ekbote
  • 1,493
  • 3
  • 15
  • 29
-1
votes
1 answer

Android - Can Application Context Solve Memory Leaks?

Using the longest-lived context instead of Activity context should be a good practice to avoid memory leaks when configuration (screen orientation, default language) change. However, I think these objects which reference to Application context…
-1
votes
1 answer

Java Library that uses Spring Data

i´m going to write a library that does some stuff and uses spring data. The idea is that projects which uses this library can import this jar and use this library: MyLib.doSomeStuff(). It is possible to use Spring in this way and how can i…
-1
votes
1 answer

CamelContext defined in Beans.xml . How do i instantiate the camelContext route programatically

I have a camel context defined in the springs beans.xml. Now i want to programatically invoke the route in camel context. How do i Do that. I want to programatically do this because I want one of my multiple nodes to run this download. I dont want…
ssD
  • 339
  • 2
  • 9
  • 22
-1
votes
1 answer

How to make a class aware of multiple application contexts in Spring MVC?

I'm trying to understand the concepts of application context in Spring MVC. To examine it I have created an application with two application contexts Test-application-context1.xml and Test-application-context2.xml and one web application context…
-1
votes
2 answers

Spring configuration XML not found for ApplicationContext

I have this very simple project made with NetBeans 8.1 (new project > Maven > Java application): Here's App.java: import org.springframework.context.ApplicationContext; import…
Kaarel Purde
  • 1,255
  • 4
  • 18
  • 38
1 2 3
57
58