这是我第一次在项目中使用springboot,之前出现过这个问题,后来修改了配置文件后,重新启动后就好了。
在日志为输出级别为INFO的情况下输出日志:
停到这了,不再输出。还以为是卡了,后面看了debug的日志才知道。是在循环
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v1.5.9.RELEASE) 2018-01-03 23:08:48 [INFO] - Starting DemoApplication on NODE-20171223AH with PID 9976 (D:\springboot\aineng-gz\target\classes started by Administrator in D:\springboot\aineng-gz) 2018-01-03 23:08:48 [INFO] - No active profile set, falling back to default profiles: default 2018-01-03 23:08:48 [INFO] - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6156496: startup date [Wed Jan 03 23:08:48 CST 2018]; root of context hierarchy 2018-01-03 23:08:49 [INFO] - HV000001: Hibernate Validator 5.3.6.Final 2018-01-03 23:08:50 [INFO] - Bean 'mybatis-org.mybatis.spring.boot.autoconfigure.MybatisProperties' of type [org.mybatis.spring.boot.autoconfigure.MybatisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-03 23:08:50 [INFO] - Bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' of type [org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$9fa312c9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-03 23:08:50 [INFO] - Bean 'druidDBConfig' of type [com.aineng.gz.common.DruidDBConfig$$EnhancerBySpringCGLIB$$ff97ddaf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2018-01-03 23:08:50 [INFO] - Bean 'dataSource' of type [com.alibaba.druid.pool.DruidDataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
在日志为输出级别为DEBUG的情况下输出日志:
不停循环的输出,不带停的。。。。。
2018-01-03 23:05:38 [DEBUG] - Property 'configLocation' not specified, using default MyBatis Configuration 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'userService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Autowiring by type from bean name 'sqlSessionFactory' via factory method to bean named 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Property 'configLocation' not specified, using default MyBatis Configuration 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'userService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'neService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Autowiring by type from bean name 'sqlSessionFactory' via factory method to bean named 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Property 'configLocation' not specified, using default MyBatis Configuration 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'neService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Autowiring by type from bean name 'sqlSessionFactory' via factory method to bean named 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Property 'configLocation' not specified, using default MyBatis Configuration 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'neService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'userService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'userService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'neService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'sqlSessionFactory' 2018-01-03 23:05:38 [DEBUG] - Returning cached instance of singleton bean 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Autowiring by type from bean name 'sqlSessionFactory' via factory method to bean named 'dataSource' 2018-01-03 23:05:38 [DEBUG] - Property 'configLocation' not specified, using default MyBatis Configuration 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'neService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'neService' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'zlSerialNumberMapper' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'zlSerialNumberMapper' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'zlSerialNumberMapper' to allow for resolving potential circular references 2018-01-03 23:05:38 [DEBUG] - Creating shared instance of singleton bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Creating instance of bean 'userService' 2018-01-03 23:05:38 [DEBUG] - Eagerly caching bean 'userService' to allow for resolving potential circular references
最后完美解决:哈哈哈。。。。。
代码在改动之前是好的,可以正常运行,最后一点点排查发现是一个非常低级的错误:如下
因为刚接触springboot 不是特别理解原因所在。还希望路过的大神能够点播点播。。。