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
0
votes
1 answer

BeanPostProcessor not invoked in MVC context

I have a web application with a context hirarchy a) application context with scanning which exclude controller:
jpprade
  • 3,497
  • 3
  • 45
  • 58
0
votes
1 answer

Grails - Getting taglib bean via application context

When attempting to get an instance to a custom taglib within a controller, via the following: def myTagLib = grailsApplication.mainContext.getBean('com.mypackage.MyTagLib') I recieve the following error: No bean named 'com.mypackage.MyTagLib' is…
cweston
  • 11,297
  • 19
  • 82
  • 107
0
votes
2 answers

How to reference a spring bean explicitly in a SpEL expression

Hi I have a spring bean named "connection" - how can I reference that explicitly in a SpEL expression from webflow - by explicitly I mean I don't want SpEL to try and find any other variables named "connection" which may exist in webflow scope -…
0
votes
1 answer

How to exclude a bean imported from parent project?

I have a project that includes the spring xml configs from the parent project. I don't need a particular bean defined in the xml files in the parent project , but I don't want to modify the parent project. I also don't want to rewrite a whole set…
CuriousMind
  • 15,168
  • 20
  • 82
  • 120
0
votes
1 answer

spring application-security configuration bean scan

In my project, I needed a custom userDetailsService, So I declaire it like this in certain package: @Service @Ihm(name = "userDetailsService")// ignore Ihm, it's just a custom annotation, which works fine public class UserDetailsServiceImpl…
ROROROOROROR
  • 959
  • 1
  • 14
  • 31
0
votes
1 answer

how to define spring beans for list of user defined classes?

I am new in spring.Using jdk 1.7. I have defined a class : public class FileDetails { String filePath; String fineName; String timeStamp; public FileDetails(String filePath, String fineName, String timeStamp) { this.filePath = filePath; …
VictorGram
  • 2,521
  • 7
  • 48
  • 82
0
votes
2 answers

DelegatingFilterProxy filter is not found and invoked

This is a snippet from my web.xml file springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy
nihar
  • 135
  • 1
  • 17
0
votes
1 answer

Marker interface with Multiple implementations...!

I have a question regarding how to implement Marker interface through spring. I need to point my marker interface to its implemented classes. Itself marker interface dont have any of function declaration. interface A { /* No Method…
0
votes
0 answers

Loading Bean without explicitly referencing or retrieving it

In my application I use an XML Application Context to configure and build Spring beans. I have a bean which is an observer and an observed bean. The configuration looks something like
Hannes
  • 5,002
  • 8
  • 31
  • 60
0
votes
2 answers

BeanCreationException in spring controller

I am getting an org.springframework.beans.factory.BeanCreationException in my spring controller as I use ResponseList bean. Error creating bean with name 'responseList' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: 1…
user2918640
  • 473
  • 1
  • 7
  • 25
0
votes
1 answer

Autowiring standalone application with NoSuchBeanDefinitionException

I have an application, but can't get it to run in Eclipse or elsewhere. Here is my class : package fr.aaa; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import…
l0r3nz4cc10
  • 1,237
  • 6
  • 27
  • 50
0
votes
4 answers

@PostInitialize part of which package

I wish to use the @PostInitialize annotation in one of my bean to load few properties after initialization is completed. Can someone please let me know where can I find this annotation? What maven dependency I need to add to get this annotation? Why…
Pratik Shelar
  • 3,154
  • 7
  • 31
  • 51
0
votes
1 answer

Spring bean injecting successfully on start up, but when using giving null pointer exception

i'm creating a web-app with Spring 3.0.6 Release My problem is when starting up the server, beans are injecting successfully.....but when using giving Null pointer Exception. Below is my applicationContext.xml
Shiva Kumar
  • 242
  • 1
  • 4
  • 9
0
votes
2 answers

Spring: WebMvcConfigurerAdapter bean registered twice

This is a followup question of Spring + Jackson + joda time: how to specify the serialization/deserialization format?. When I was writing the final version of the code, for the first time I wrote it as follows: (only relevant portion is…
zeodtr
  • 10,645
  • 14
  • 43
  • 60