這是我第一次在項目中使用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 不是特別理解原因所在。還希望路過的大神能夠點播點播。。。