springboot啟動時報異常Class not found so assuming code is running on a pre-Java 9 JVM
版權宣告:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處連結和本宣告。
本文連結:轉自:
Tomcat啟動時報異常Class not found so assuming code is running on a pre-Java 9 JVM
參考的部落格已經很清楚了。
在springboot中,pom.xml是沒有直接的tomcat依賴的,需要去
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
ctrl + 滑鼠左鍵點選 spring-boot-starter-web進入spring-boot-starter-web.pom
按ctrl + F 搜尋 tomcat
即可看到tomcat的依賴。
然後在該檔案(spring-boot-starter-web.pom)下刪除tomcat依賴,新增Undertow 依賴即可。
註釋掉的部分就是刪除掉的tomcat依賴,下面新增一個undertow的依賴即可。
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!-- <version>2.4.1</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<!-- Add Undertow container -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
相關文章
- Springboot專案啟動異常排查Spring Boot
- Eclipse 啟動專案錯誤:class not foundEclipse
- 解決WebLogic啟動時BEA-171522異常(啟動時報classcast exception)WebASTException
- JVM(四)——OutOfMemoryError 異常JVMError
- [jvm]常見的oom異常JVMOOM
- 記一次android app啟動錯誤 Error running :Default Activity not foundAndroidAPPError
- IDEA啟動時報Failed to create JVM錯誤的解決IdeaAIJVM
- JVM異常現象解析JVM
- JAVA: 捕捉啟動時的異常Java
- 解決jetty7.0.pre5啟動時報ClassNotFoundException: javax.interceptor.InvocationContext異常的問題JettyExceptionJavaContext
- React Native Android 啟動異常React NativeAndroid
- springboot自定義異常Spring Boot
- oracle例項啟動異常慢案例一Oracle
- storm 啟動異常 Error when processing eventORMError
- springboot 全域性異常攔截器,友好異常提示Spring Boot
- Kettle9:異常處理
- WebService異常Unexpected wrapper element ... found. Expected ...WebAPP
- JVM 異常退出的問題解決JVM
- SpringBoot中異常處理Spring Boot
- 異常 This application has no explicit mapping for /error so yAPPError
- Oracle RAC啟動因CTSS導致的異常Oracle
- Hive多視窗啟動異常(已解決!)Hive
- [異常筆記] zookeeper叢集啟動異常: Cannot open channel to 2 at election address ……筆記
- 聊聊springboot自動裝配出現的TypeNotPresentExceptionProxy異常排查Spring BootException
- Unrecognized Windows Sockets error: 0: JVM_Bind異常ZedWindowsErrorJVM
- springboot全域性異常處理Spring Boot
- SpringBoot統一異常處理Spring Boot
- 【JVM】JVM系列之Class檔案(三)JVM
- ***報錯Class 'Redis' not found in(原創)Redis
- 異常: 'ascii' codec can't encode charactersASCII
- 請教:castor MappingException: Could not find the class異常ASTAPPException
- 安裝啟動service redisd start時報錯 /var/run/redis_6379.pid exists, process is already running or crashedRedis
- eclipse啟動時報告錯誤:Java was started but returned exit code=-805306369EclipseJava
- JVM異常不列印堆疊資訊 [ -XX:-OmitStackTraceInFastThrow ]JVMMITAST
- 啟動網路卡時報:does not seem to be present
- springboot下新增全域性異常處理和自定義異常處理Spring Boot
- SpringBoot之全域性捕獲異常Spring Boot
- SpringBoot之全域性異常處理Spring Boot