autowired
Calling Spring component from groovy
I have a spring-based java application with some useful components. As a part of the system I have a groovy script, to process some reports. I would like to call a spring component from groovy script.[详细]
2023-04-12 00:35 分类:问答Spring 3.0 Annonation-based AutoWiring
In the below xml configuartion, i have a sql query which needs to be injected to empDAO. <bean id=\"propertyPlaceholderConfigurer\"[详细]
2023-04-11 03:41 分类:问答Static Fields + Autowiring in Spring
Can we autowire static fields in spring controller ? eg: @Autowired 开发者_如何学JAVApublic static JNDIEMailSender jNDIEmailSender;[详细]
2023-04-10 13:27 分类:问答Spring: Autowiring of a bean of type java.util.Locale does not seem to work
I am writing a very simple tutorial about Spring (3.0.x) for my fellow developers and have encountered a weird behaviour: bean of type java.util.Locale is not autowired into other bean and there is no[详细]
2023-04-06 16:22 分类:问答hibernate validator without using autowire
I\'am currently working on a Jersey project and decided to use Hibernate validator for the parameter validations. All dependencies injected on the Endpoint classes are properly initialized. However fo[详细]
2023-04-05 14:07 分类:问答Why does Autowiring not function in a thread?
I\'ve made a maven project in Spring 3.0, I\'ve made some DAO, services and controllers, in one of mine controller I call a service in which I start a thread, the problem is that in the thread I decla[详细]
2023-04-05 02:51 分类:问答Inject mock into bean failed
For my unit tests, I want to use mocks for some autowired dependencies of the bean under test. The mock is created and injected into the unit test class properly, but injecting it into the bean under[详细]
2023-04-04 06:02 分类:问答Autowire doesn't work on servlets
I can\'t figure out why Autowired of DAOs classes works fine in Test classes but not in servlets. web.xml file load correctly context configuration as i can see by the log, so the problem must be in m[详细]
2023-04-04 05:34 分类:问答Why Spring tc localhost server throw nullPointerException instead of autowiring?
I\'m struggling for a problem that seems to be stupid but that I can\'t understand. I\'m testing a very simple servlet using the localhost server provided with SpringSource.[详细]
2023-04-03 04:34 分类:问答Spring: What is the best way to configure at startup time which service beans should be initialized?
Ok, this might sound like a weird question, but here\'s the catch: We have a Spring-based application here that has different \"setup\" modes. In one mode it needs to use additional service beans (tha[详细]
2023-04-02 18:01 分类:问答