20200710 idea springboot打包问题
idea 2020
从new-test拉代码
先checkout后rename为new-test-xxxxx,然后mvn clean package打包成功后上传到sit环境,跑一下服务,报错:
2020-07-10 15:10:36.153 INFO 52501 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2020-07-10 15:10:36.479 WARN 52501 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'extSupBankAcctController.v1': Unsatisfied dependency expressed through field 'extSupBankAcctService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'extSupBankAcctServiceImpl': Unsatisfied dependency expressed through field 'supplierBkAccountEsRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'supplierBkAccountEsRepositoryImpl': Unsatisfied dependency expressed through field 'mapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'supplierBkAccountEsMapper' defined in URL [jar:file:/srm_file/srm-supplier/libs/srm-supplier.jar!/BOOT-INF/classes!/org/hzero/srm/supplier/infra/mapper/SupplierBkAccountEsMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$f4d0ac39]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.hzero.boot.platform.mybatis.autoconfigure.SqlParserInterceptorConfiguration': Unsatisfied dependency expressed through method 'setSqlInterceptors' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'flexSqlInterceptor': Unsatisfied dependency expressed through field 'modelService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'modelServiceImpl': Unsatisfied dependency expressed through field 'flexRemoteService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.hzero.boot.platform.flex.feign.FlexRemoteService': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'feign.codec.Encoder' available: expected single matching bean but found 2: feignEncoder,feignFormEncoder
2020-07-10 15:10:36.480 INFO 52501 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
2020-07-10 15:10:36.482 INFO 52501 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing FeignContext-hzero-platform: startup date [Fri Jul 10 15:10:35 CST 2020]; parent: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@67e2d983
也尝试过先从new-test选择new branch from selected …名字为new-test-xxxxx然后mvn clean package成功上传sit跑也会报错
把本地分支new-test-xxxxx名字改回new-test然后打包上传就可以跑起来
2020/7/13报错