spring_boot整合mybatis项目启动时报错

本文档记录了在Spring Boot项目中整合Mybatis时遇到的启动报错问题。报错信息显示多个MapperFactoryBean已被定义,且实体类中存在非法的重复getter方法,导致JavaBeans规范被破坏。解决方法是删除实体类中多余的getter和setter方法。
摘要由CSDN通过智能技术生成

报错信息如下:

[INFO ] 06-29 10:50:45 [main] com.hand.demo.DemoApplication - logback INFO ( TRACE < DEBUG < INFO < WARN < ERROR )


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.0.RELEASE)


[INFO ] 06-29 10:50:46 [main] com.hand.demo.DemoApplication - Starting DemoApplication on LAPTOP-4VJQD705 with PID 10832 (F:\ueba-demo\target\classes started by jinzhifeng in F:\ueba-demo)
[DEBUG] 06-29 10:50:46 [main] com.hand.demo.DemoApplication - Running with Spring Boot v1.4.0.RELEASE, Spring v4.3.2.RELEASE
[INFO ] 06-29 10:50:46 [main] com.hand.demo.DemoApplication - The following profiles are active: demo
[INFO ] 06-29 10:50:46 [background-preinit] o.h.validator.internal.util.Version - HV000001: Hibernate Validator 5.2.4.Final
[INFO ] 06-29 10:50:46 [main] o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@e350b40: startup date [Thu Jun 29 10:50:46 GMT+08:00 2017]; root of context hierarchy
[INFO ] 06-29 10:50:48 [main] o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:/F:/ueba-demo/conf/dev/shiro.xml]
[INFO ] 06-29 10:50:49 [main] o.s.b.f.s.DefaultListableBeanFactory - Overriding bean definition for bean 'managementServletContext' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcHypermediaManagementContextConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration; factoryMethodName=managementServletContext; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointWebMvcAutoConfiguration.class]]
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'alarmDao' and 'com.hand.demo.dao.AlarmDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'applicationDao' and 'com.hand.demo.dao.ApplicationDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'authorityDao' and 'com.hand.demo.dao.AuthorityDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'baseOperDao' and 'com.hand.demo.dao.BaseOperDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'businessDao' and 'com.hand.demo.dao.BusinessDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'companyInfoDao' and 'com.hand.demo.dao.CompanyInfoDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'deAndEmpDao' and 'com.hand.demo.dao.DeAndEmpDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'deptDao' and 'com.hand.demo.dao.DeptDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'deptKpiDao' and 'com.hand.demo.dao.DeptKpiDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'empBusDao' and 'com.hand.demo.dao.EmpBusDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'empDao' and 'com.hand.demo.dao.EmpDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'empDetailDao' and 'com.hand.demo.dao.EmpDetailDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'freeStateDao' and 'com.hand.demo.dao.FreeStateDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'generalDao' and 'com.hand.demo.dao.GeneralDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'informDao' and 'com.hand.demo.dao.InformDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'infoTypeDao' and 'com.hand.demo.dao.InfoTypeDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'infoUrgencyDao' and 'com.hand.demo.dao.InfoUrgencyDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'interStatesDao' and 'com.hand.demo.dao.InterStatesDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'jobWebInfoDao' and 'com.hand.demo.dao.JobWebInfoDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'operateDetailDao' and 'com.hand.demo.dao.OperateDetailDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'operationConfigDao' and 'com.hand.demo.dao.OperationConfigDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'personageKpiDao' and 'com.hand.demo.dao.PersonageKpiDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'reportDao' and 'com.hand.demo.dao.ReportDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'roleDao' and 'com.hand.demo.dao.RoleDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'tagDao' and 'com.hand.demo.dao.TagDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'timeRecordDao' and 'com.hand.demo.dao.TimeRecordDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'workConditionDao' and 'com.hand.demo.dao.WorkConditionDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - Skipping MapperFactoryBean with name 'ywConfigDao' and 'com.hand.demo.dao.YwConfigDao' mapperInterface. Bean already defined with the same name!
[WARN ] 06-29 10:50:49 [main] o.m.s.mapper.ClassPathMapperScanner - No MyBatis mapper was found in '[com.hand.demo.dao]' package. Please check your configuration.
[WARN ] 06-29 10:50:49 [main] o.s.c.a.ConfigurationClassPostProcessor - Cannot enhance @Configuration bean definition 'myBatisMapperScannerConfig' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
[INFO ] 06-29 10:50:50 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'loginUserManager' of type [class com.hand.demo.shiro.utils.LoginUserManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:50 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor#0' of type [class org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:50 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'DBConfig' of type [class com.hand.demo.config.DBConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:50 [main] com.zaxxer.hikari.HikariDataSource - demoDataSourceName - Started.
[INFO ] 06-29 10:50:51 [main] com.zaxxer.hikari.pool.PoolBase - demoDataSourceName - Driver does not support get/set network timeout for connections. (com.mysql.jdbc.JDBC4Connection.getNetworkTimeout()I)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'dataSource' of type [class com.zaxxer.hikari.HikariDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$e3897a4f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'dataSourceInitializer' of type [class org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'myBatisConfig' of type [class com.hand.demo.config.MyBatisConfig$$EnhancerBySpringCGLIB$$8d124a16] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'annotationDrivenTransactionManager' of type [class org.springframework.jdbc.datasource.DataSourceTransactionManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$195d6ef] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 06-29 10:50:51 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisRealm' of type [class com.hand.demo.shiro.shiro.RedisAuthenticatingRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not elig

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值