Questions tagged [spring-context]

95 questions
0
votes
0 answers

ApplicationContext import not accessible in Eclipse

I am learning Spring from this tutorial here : https://youtu.be/k0mNw-_zxrc You can skip to 58.35 minutes as video is pretty long. In this tutorial, instructor downloads spring dependencies (spring-beans, spring context, spring-core) in version…
0
votes
0 answers

Why is BeanFactoryPostProcessor invoked before creating BeanDefinition's for BeanFactory?

I am studying the internal structure of Spring and trying to understand the stages of the life cycle of beans, how and when they are created and so on. Spring provides us with 2 interfaces for configuring bins in…
Santa Monica
  • 332
  • 3
  • 11
0
votes
0 answers

While running a Spring Application does JVM after executing the main method, hands over the program execution to Spring Container?

Even if JVM is there, how it is allowing Spring Container to come into the play while executing the Spring Application? When we have configured JVM then how still Spring Container is taking responsibility to execute the objects?
0
votes
0 answers

Unit tests, failed to load ApplicationContext after converting properties to yml

Our main application is using Config Server for storing all of its configuration, but the tests were so far configured using a copy of that config as application.yml and overridden properties in application.properties plugged into the test class…
kacpr
  • 440
  • 1
  • 8
  • 28
0
votes
0 answers

Springboot context is null from EJB

Springboot context is not being loaded from EJB. I have a Java EJB based Application that is deployed on WebLogic. I also have in a springboot application in my EJB module that loads all the beans. I'm trying to access the springboot context to be…
0
votes
0 answers

Class Cast Exception between Spring Bean and EJB 3 - Jboss7

I have an Spring Controller with a EJB injected. I can inject this EJB using spring proxy:
Xavi Torrens
  • 337
  • 1
  • 12
0
votes
1 answer

Spring Cloud dynamic consumer creation, message type is lost

I'm creating the cloud streams and consumers for it dynamically can't get consumer defined properly as information about type is lost. In the example below consumer defined with @Bean annotation works fine, it receive message with all headers and…
0
votes
1 answer

Getting errors ( can not resolve @Configuration, @Bean, AnnotaionConfigApplicationContext) in loading spring-context version in intelij idea

I am learning Spring and trying to practice the example from a book. in pom.xml i have used dependency as below. while i am using the annotations and classes which are related to spring-context, it says error can not resolve the values…
0
votes
0 answers

How to add spring beans from maven plugin to spring context in a project?

I am building a custom plugin that reads classes from the spring project it's added to and creates a custom bean with these classes methods. I want to add the custom bean (that was created in the plugin) to the spring context of the project. I am…
aGomaa
  • 1
  • 1
0
votes
2 answers

Parsing a Fixed length Flat xml file in spring batch

My XML file looks like below, ABC123411/10/20 XBC128911/10/20 BCD456711/23/22 This is a fixed length flat xml file, and I need to parse this file as For…
0
votes
1 answer

getting NullPointerException while calling SessionFactory in JSP page

While calling qs.getSubList() method occurring below exception. don't know why it is showing error, while calling same method from other class its work perfectly and return Question list. java.lang.NullPointerException: Cannot invoke…
0
votes
0 answers

Spring Condition and Bean not found issue

I have a bean with a 3-arg and a 4-arg constructor. Based on local or cloud condition it has to create the bean. If local, initialize the bean using 3-arg constructor else use the 4-arg constructor. I created LocalCondition and RemoteCondition and…
0
votes
1 answer

Tomcat 10 pass Environment Variable or Property to spring boot context

Well, I'm trying to deploy a spring boot application in a tomcat 10 server, passing a one environment key. I need to pass de "secret" of jasypt for decode the passwords in my application, but I can't do this because the context don't run the same as…
0
votes
0 answers

CastException: org.springframework.beans.factory.BeanDefinitionStoreException incompatible with org.springframework.web.context.WebApplicationContext

I am using open JDK11, Spring 3.1 version, with below code. Using tomcat 8.5 import org.springframework.web.context.ContextLoaderListener; import org.springframework.web.context.WebApplicationContext; public class TomcatStopListener…
0
votes
1 answer

@ConditionalOnBean not work for spring boot test

Hy everyone! I'm trying to solve the problem for a very long time. There is very simple spring boot test public class ApplicationTest { @Test void testContext() { SpringApplication.run(Application.class); } } And several…