Boa noite pessoal!
Estou dando uma estudada de Spring pela apostila do curso FJ-27 que pertence a um amigo meu do serviço.
Vamos la:
Estou tentando efetuar testes da aplicação pelo JUnit mas estou tomando a mensagem:
18/07/2012 23:20:02 org.springframework.test.AbstractDependencyInjectionSpringContextTests prepareTestInstance
INFO: ApplicationContext has not been configured for test [br.com.caelum.fj27.gerenciador.GerenciadorProjetoTest]: dependency injection will NOT be performed.
A minha duvida é que eu fiz igual ao solicitado na apostila:
Segue meu arquivo de configuração do spring:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="gerenciadorProjeto" class="br.com.caelum.fj27.gerenciador.GerenciadorProjeto">
<property name="projetoDAO" ref="projetoDAO" />
</bean>
<bean id="gerenciadorTarefa" class="br.com.caelum.fj27.gerenciador.GerenciadorTarefa" />
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" destroy-method="destroy">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>
<prop key="hibernate.connection.url">jdbc:mysql://localhost/teste</prop>
<prop key="hibernate.connection.driver_class">com.mysql.jdbc.Driver</prop>
<prop key="hibernate.connection.username">root</prop>
<prop key="hibernate.connection.password">root</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>
<property name="annotatedClasses">
<list>
<value>br.com.caelum.fj27.modelo.Projeto</value>
<value>br.com.caelum.fj27.modelo.Tarefa</value>
<value>br.com.caelum.fj27.modelo.LogDeTrabalho</value>
</list>
</property>
</bean>
<bean id="projetoDAO" class="br.com.caelum.fj27.dao.hibernate.ProjetoDAOImpl">
<constructor-arg index="0" ref="sessionFactory" />
</bean>
<bean id="tarefaDAO" class="br.com.caelum.fj27.dao.hibernate.TarefaDAOImpl">
<constructor-arg index="0" ref="sessionFactory" />
</bean>
</beans>
Alguém pode me dar uma luz?