springboot打包后发布都服务器有时候无法启动,跪求大神指点迷津!!!
salut 2020-04-17 09:00:54 报错信息:
during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'objectMapperConfigurer' defined in class path resource [springfox/documentation/spring/web/SpringfoxWebMvcConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authorizationAttributeSourceAdvisor' defined in class path resource [com/cmcc/framework/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'authorizationAttributeSourceAdvisor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilterFactoryBean' defined in class path resource [com/cmcc/framework/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'shiroFilterFactoryBean' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityManager' defined in class path resource [com/cmcc/framework/config/ShiroConfig.class]: Unsatisfied dependency expressed through method 'securityManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userRealm': Unsatisfied dependency expressed through field 'menuService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'menuServiceImpl': Unsatisfied dependency expressed through field 'menuMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'menuMapper' defined in URL [jar:file:/data/app/cmcc/CMCC_CX.jar!/BOOT-INF/classes!/com/cmcc/project/system/menu/mapper/MenuMapper.class]: Cannot resolve reference to bean 'sqlSessionTemplatePrimary' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'sqlSessionTemplatePrimary' available
08:43:12.742 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - [report,42] -
***************************
APPLICATION FAILED TO START
***************************
Description:
Field menuMapper in com.cmcc.project.system.menu.service.MenuServiceImpl required a bean named 'sqlSessionTemplatePrimary' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Qualifier(value=securityManager)
Action:
Consider defining a bean named 'sqlSessionTemplatePrimary' in your configuration.
详细链接在日志在这里:https://mp.csdn.net/console/editor/html/105572466