今天從gitee上拉取了一個springboot項目,啟動了一半發現一直卡着不動
. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.0.0.RELEASE) 2020-10-19 15:37:23 INFO [main] com.xxx.xxx.ErpApplication - Starting ErpApplication on DESKTOP-QARM8NJ with PID 11428 (E:\xxx\xxx\) 2020-10-19 15:37:23 DEBUG [main] com.xxx.xxx.ErpApplication - Running with Spring Boot v2.0.0.RELEASE, Spring v5.0.4.RELEASE 2020-10-19 15:37:23 INFO [main] com.xxx.xxx.ErpApplication - No active profile set, falling back to default profiles: default _ _ |_ _ _|_. ___ _ | _ | | |\/|_)(_| | |_\ |_)||_|_\ / | 3.0.7.1 2020-10-19 15:37:27 INFO [main] com.xxx.xxx.ErpApplication - Started ErpApplication in 4.742 seconds (JVM running for 6.091)
接着在啟動類的main方法中加入了這么一段代碼
1 public static void main(String[] args) { 2 System.out.println("---start---"); 3 SpringApplication.run(ErpApplication.class, args); 4 System.out.println("---end---"); 5 }
輸出如下
---start--- . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.0.0.RELEASE) 2020-10-19 15:53:39 INFO [main] com.xxx.xxx.ErpApplication - Starting ErpApplication on DESKTOP-QARM8NJ with PID 183242020-10-19 15:53:39 DEBUG [main] com.xxx.xxx.ErpApplication - Running with Spring Boot v2.0.0.RELEASE, Spring v5.0.4.RELEASE 2020-10-19 15:53:39 INFO [main] com.xxx.xxx.ErpApplication - No active profile set, falling back to default profiles: default _ _ |_ _ _|_. ___ _ | _ | | |\/|_)(_| | |_\ |_)||_|_\ / | 3.0.7.1 2020-10-19 15:53:43 INFO [main] com.xxx.xxx.ErpApplication - Started ErpApplication in 4.693 seconds (JVM running for 6.038) ---end---
運行到這里說明程序是已經啟動了的,接着我在去訪問項目地址並成功的訪問到了,這里就先不貼圖了。
問題原因:應該是日志配置的問題,隨后找到logback的xml文件,這里我起初也不是特別熟悉的,一點一點研究下來之后發現root標簽中的level級別是ERROR級別,隨后我更改為INFO級別之后重啟服務,問題得到解決,看到了啟動的一大堆日志輸出
解決幫助來源於:https://blog.csdn.net/aero_duan/article/details/94595775