igor_ks 13 de abr. de 2017 1 like
Bom, sem código não da pra ajudar muito. Pela mensagem diz que nao conseguiu injetar seu bean com nome flyway. Provavelmente ele nao ta configurado corretamente.
Luis_Rabelo2004 14 de abr. de 2017
Boa noite, esse e o meu XML do applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
< context : annotation - config / >
< mvc : annotation - driven / >
< mvc : default - servlet - handler / >
< mvc : resources location = "/resources/img"
mapping = "/resources/**" cache - period = "5000" / >
< context : component - scan base - package = "br.com.project.geral.controller" / >
< context : component - scan base - package = "br.com.srv.interfaces" / >
< context : component - scan base - package = "br.com.srv.implementacao" / >
< context : component - scan base - package = "br.com.repository.interfaces" / >
< context : component - scan base - package = "br.com.dao.implementacao" / >
< context : component - scan base - package = "br.com.project.bean.view" / >
< context : component - scan base - package = "br.com.project.bean.geral" / >
< context : component - scan base - package = "br.com.project.report.util" / >
< context : component - scan base - package = "br.com.project.util.all" / >
< context : component - scan base - package = "br.com.project.bean.view.grafico" / >
< context : component - scan base - package = "br.com.framework.controller.crud" / >
< context : component - scan base - package = "br.com.framework.interfac.crud" / >
<! -- Data Source -- >
< bean id = "springDataSource" name = "springDataSource"
class = "org.springframework.jndi.JndiObjectFactoryBean" lazy - init = "false" >
< property name = "jndiName" >
< value > java : comp / env / jdbc / datasource < / value >
< / property >
< / bean >
< bean id = "flyway" class = "org.flywaydb.core.Flyway" init - method = "migrate"
lazy - init = "false" >
< property name = "dataSource" ref = "springDataSource" / >
< property name = "baselineOnMigrate" value = "true" / >
< property name = "table" value = "version" / >
< property name = "sqlMigrationPrefix" value = "v" / >
< property name = "sqlMigrationSeparator" value = "_" / >
< property name = "encoding" value = "ISO-8859-1" / >
< property name = "validateOnMigrate" value = "true" / >
< / bean >
< bean id = "transactionManager" name = "transactionManager"
class = "org.springframework.jdbc.datasource.DataSourceTransactionManager"
lazy - init = "false" >
< property name = "dataSource" ref = "springDataSource" / >
< / bean >
< bean id = "jdbcTemlate" name = "jdbcTemlate"
class = "br.com.framework.implementacao.crud.JdbcTemplateImpl" >
< constructor - arg name = "dataSource" ref = "springDataSource" / >
< / bean >
< bean id = "simpleJdbcTemplate" name = "simpleJdbcTemplate"
class = "br.com.framework.implementacao.crud.SimpleJdbcTemplateImpl" >
< constructor - arg name = "dataSource" ref = "springDataSource" / >
< / bean >
< bean id = "simpleJdbcInsert" name = "simpleJdbcInsert" class = "br.com.framework.implementacao.crud.SimpleJdbcInsertImplents" lazy - init = "false" >
< constructor - arg name = "dataSource" ref = "springDataSource" / >
< / bean >
< bean id = "simpleJdbcClassImpl" name = "simpleJdbcClassImpl" class = "br.com.framework.implementacao.crud.SimpleJdbcClassImpl" lazy - init = "false" >
< constructor - arg name = "dataSource" ref = "springDataSource" / >
< / bean >
< bean id = "urlMapping" class = "org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"
lazy - init = "false" >
< property name = "mappings" >
< props >
< prop key = "/index.jsp" > indexController < / prop >
< / props >
< / property >
< / bean >
< bean id = "viewResolver"
class = "org.springframework.web.servlet.view.InternalResourceViewResolver"
lazy - init = "false" >
< property name = "viewClass" value = "org.springframework.web.servlet.view.JstlView" / >
< property name = "prefix" value = "/WebContent/" / >
< property name = "suffix" value = "*.jsf, *.xhtml, *.html, *.jsp, *.js" / >
< / bean >
< bean name = "indexController" lazy - init = "false"
class = "org.springframework.web.servlet.mvc.ParameterizableViewController" / >
< bean class = "org.springframework.beans.factory.config.CustomScopeConfigurer" lazy - init = "false" >
< property name = "scopes" >
< map >
< entry key = "view" >
< bean class = "br.com.project.bean.geral.ViewScope" / >
< / entry >
< / map >
< / property >
< / bean >
< bean id = "reportUtil" class = "br.com.project.report.util.ReportUtil" / >
< bean id = "utilFramework" class = "br.com.framework.utils.UtilFramework" scope = "session" / >