Questions tagged [spring-bean]

A simple JavaBean managed by the Spring IoC container.

A simple JavaBean managed by the Spring IoC container. These beans are created with the configuration metadata that is supplied to the container, for example, in the form of XML <bean/> definitions or @Bean annotation. Actually, the BeanFactory is the main IoC container which instantiates, configures, and manages these beans. These beans typically have associations with each other, and therefore have dependencies between themselves. These dependencies are configured in the configuration files used by the BeanFactory. Other dependencies that are invisible from the configuration file could be a function of programmatic interactions between beans at run-time.

767 questions
-1
votes
3 answers

Spring boot : bean creation profile specific

I am working on a spring boot application.i am using spring boot version: 2.2.4-RELEASE I am trying to create a bean specific for a profile.but the bean is not creating as expected. Below is my configuration file: @Configuration @Slf4j public class…
JingJong
  • 207
  • 1
  • 3
  • 14
-1
votes
2 answers

Getting BeanCreationException on server startup. I am using 4.0.0 version of spring with 3.0.7 version of apache tiles and 8.5v version of tomcat

Version info 4.0.0 spring, 3.0.7 apache-tiles, 8.5 tomcat, I am using these version and while server startup I am getting BeanCreationException. The error stack trace is given below. servlet-context.xml
-1
votes
1 answer

Spring Boot How can i easy Scope Request bean in Async method?

Spring boot How can i easy use bean with Request Scope in async method. When i try execute got exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bean ! class': Scope 'request' is not active for the…
adfFun
  • 1
  • 4
-1
votes
1 answer

Spring request scoped bean internals

I have been using request scoped beans for my application and I'm curious to know how spring stores those kind of beans in the application context? is there a http reuqest id linked to it? any help/documentation is most welcomed as I did not find…
Sophian Achiba
  • 197
  • 1
  • 13
-1
votes
1 answer

How to include Spring context in third party library method?

I have problem while using spring boot. This example of code: @Component class Bat extends OtherLibrary{ @Autowired public Life var; @PostConstruct public void registerBat(){ OtherLibraryApi api = new otherLibraryApi() …
foxis
  • 125
  • 6
-1
votes
1 answer

Is it possible to define to bean with same name in two different namespace without using @Qualifer and @resource

I have two packages and beans as below in spring com.myapp.test1 myService com.myapp.test2 myService part 1:The solution for this situation is giving name for beans like this: @Service(name="myService1") myService and …
Ali Akbarpour
  • 958
  • 2
  • 18
  • 35
-1
votes
2 answers

No qualifying bean exception

I am developing Spring web application inside a maven project. However, I am able to obtain my .war file with no erors using the mvn clean install, but when I want to run it on apache tomcat I got an error that I can't understand whic says: Caused…
-1
votes
1 answer

Bean creation issue on websphere

I am getting the below exception while creating bean eqSaml11TicketValidator. I am using IBM Websphere 8.5.5. Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name…
-1
votes
1 answer

My spring bean not working properly?

I'm getting null values for some of the methods in pojo class and other methods are working fine. This is my POJO class Student.java public class Student { private int id; private String name; private String message1; private String…
Rama Krishna
  • 275
  • 3
  • 12
-1
votes
1 answer

Selecting the right candidates for spring bean. What to what not to

Last year when I started learning spring I remember an article that expalined that not all pojos are to be defined as beans. So I'm planning to create a web app say EmployeeMaintenance. CRUD Functionalities are there. I will surely end up creating…
Vinodh Thiagarajan
  • 758
  • 3
  • 9
  • 19
-1
votes
2 answers

How beans inside Spring API initialized

As per my understanding, -> define few spring beans in my xml, -> load that xml inside web.xml, which is available throughout my application Question is How the internals bean of Spring initialized, i do not include any xml from Spring, is it…
Ankur Singhal
  • 26,012
  • 16
  • 82
  • 116
-1
votes
1 answer

How to set the route builder based on condition in camelContext

In my existing code I am having 2 route builders inside my camelcontext bean I want to set…
-1
votes
1 answer

how to bind multiple values in spring bean and show on jsp page

i have values like class 1 (i). user 1 name (i). user 1 age (ii). user 2 name (ii). user 2 age... class 2 (i). user 1 name (i). class 1 age (ii). user 2 name (ii). user 2 age... class 3 (i). user 1 name (i). user 1 age (ii). user 2 name (ii).…
-2
votes
1 answer

What are the differences between object and spring beans?

You may explain the differences between spring bean and object. I also still don't understand beans in spring What exactly is the role of spring beans in spring? Apparently, the definition that beans form the main backbone of our application is not…
-2
votes
2 answers

What happens to Spring bean after ApplicationContext is shutdown

Suppose I have a normal application in which I am creating a Spring application context using ApplicationContext applicationContext = new FileSystemXmlApplicationContext("bean.xml"); Now, suppose in this bean.xml there is bean definition for a…
hagrawal7777
  • 14,103
  • 5
  • 40
  • 70
1 2 3
51
52