I am using spring and the @Configurable annotations so I can use DI on class that has been newed up. The problem I have is that I can get it to run in eclipse, but when I build my jar to run in a production environment the DI is not happening. There are no exceptions happening, just null objects that have been autowired in. Below is my application Context.
Thanks
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:task="http://www.springframework.org/schema/task"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schem...ng-jee-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schem...ng-aop-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schem...g-task-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schem...ing-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schem...ontext-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
<context:annotation-config />
<context:load-time-weaver />
<context:spring-configured />
<!-- This declaration will cause Spring to locate every @Component, @Repository
and @Service in your application -->
<context:component-scan base-package="carterinc.dc" />
</beans>


Reply With Quote