启动停止报错:
[] - 2022-02-09 10:18:23.290 - WARN [ main] - AbstractApplicationContext.refresh():558:Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'objectMapperConfigurer' defined in springfox.documentation.spring.web.SpringfoxWebMvcConfiguration: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webConfig' defined in file [D:\workspace_manage\manage-backend\target\classes\com\kayak\common\config\WebConfig.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tokenMethodArgumentResolver': Unsatisfied dependency expressed through field 'jwtTokenProvider'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jwtTokenProvider' defined in file [D:\workspace_manage\manage-backend\target\classes\com\kayak\common\security\jwt\JwtTokenProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userProfile' defined in file [D:\workspace_manage\manage-backend\target\classes\com\kayak\common\security\springsecurity\UserProfile.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'manageSysUserImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'manageSysUserMapper' defined in file [D:\workspace_manage\manage-backend\target\classes\com\kayak\modules\user\mapper\ManageSysUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\workspace_manage\manage-backend\target\classes\mapping\modules\cardbin\CardBinMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is 'file [D:\workspace_manage\manage-backend\target\classes\mapping\modules\cardbin\CardBinMapper.xml]'. Cause: org.apache.ibatis.builder.BuilderException: Parsing error was found in mapping #{}. Check syntax #{property|(expression), var1=value1, var2=value2, ...}
[] - 2022-02-09 10:18:23.290 - INFO [ main] - DynamicRoutingDataSource.destroy():201:dynamic-datasource start closing ....
[] - 2022-02-09 10:18:23.298 - INFO [ main] - DruidDataSource.close():1965:{dataSource-2} closing ...
[] - 2022-02-09 10:18:23.314 - INFO [ main] - DruidDataSource.close():2037:{dataSource-2} closed
[] - 2022-02-09 10:18:23.314 - INFO [ main] - DruidDataSource.close():1965:{dataSource-1} closing ...
[] - 2022-02-09 10:18:23.324 - INFO [ main] - DruidDataSource.close():2037:{dataSource-1} closed
[] - 2022-02-09 10:18:23.324 - INFO [ main] - DynamicRoutingDataSource.destroy():221:dynamic-datasource all closed success,bye
[] - 2022-02-09 10:18:23.337 - INFO [ main] - ConditionEvaluationReportLoggingListener.logMessage():136:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
Disconnected from the target VM, address: '127.0.0.1:56269',transport: 'socket'
Process finished with exit code 1
报错排查分析:
网上查有的说是端口号占用有的说是idea、maven版本不一致,但都不是问题所在
问题具体原因在warn警告信息里: xml中SQL语句编写错误
注意:
以后不要只盯着报错,在报错不明确的情况下,对warn警告提示也要有所关注