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
- JAVA: 捕捉啟動時的異常Java
- 記一次android app啟動錯誤 Error running :Default Activity not foundAndroidAPPError
- 使用URLClassLoader報錯not class found exceptionException
- SpringBoot+WebSocket實時監控異常Spring BootWeb
- 異常 This application has no explicit mapping for /error so yAPPError
- React Native Android 啟動異常React NativeAndroid
- Lumen 報錯 : Class 'League\Flysystem\Adapter\Local' not foundAPT
- JVM異常現象解析JVM
- 【JavaDebug(七)】之SpringBoot的Web專案異常:This application has no explicit mapping for /error, so you are seJavaSpring BootWebAPPError
- maven外掛 tomcat7啟動報錯,異常如下MavenTomcat
- springboot自定義異常Spring Boot
- RAC二節點啟動異常
- IDEA啟動時報Failed to create JVM錯誤的解決IdeaAIJVM
- Linux Red Hat啟動時顯示system not foundLinux
- SpringBoot中異常處理Spring Boot
- springboot 全域性異常攔截器,友好異常提示Spring Boot
- npm install報錯, npm ERR! code MODULE_NOT_FOUNDNPM
- 搭建fast-whisper 環境時報錯 Unable to load any of {libcudnn_ops.so.9.1.0, libcudnn_ops.so.9.1, libcudnn_ops.so.9, libcudnn_ops.so}ASTDNN
- 聊聊springboot自動裝配出現的TypeNotPresentExceptionProxy異常排查Spring BootException
- SparkStreaming報錯: Only one SparkContext may be running in this JVM (see SPARK-2243)SparkContextJVM
- [異常筆記] zookeeper叢集啟動異常: Cannot open channel to 2 at election address ……筆記
- springboot全域性異常處理Spring Boot
- SpringBoot統一異常處理Spring Boot
- Kettle9:異常處理
- 啟動idea時, 碰到 "failed to load JVM DLLIdeaAIJVM
- oracle例項啟動異常慢案例一Oracle
- 安裝啟動service redisd start時報錯 /var/run/redis_6379.pid exists, process is already running or crashedRedis
- 解決GITLAB無法啟動runsv no runningGitlab
- 【ASM】Oracle RAC css啟動報錯"Duplicate voting file found"ASMOracleCSS
- 處理mysql無法啟動且啟動時服務沒報錯的異常情況MySql
- 啟動Dubbo專案註冊Zookeeper時提示zookeeper not connected異常原理解析
- SpringBoot之全域性捕獲異常Spring Boot
- SpringBoot專案中遇到的異常Spring Boot
- SpringBoot之全域性異常處理Spring Boot
- 【SpringBoot】全域性異常處理@ControllerAdviceSpring BootController
- pip install scrapy 報異常時怎麼處理?