我面臨的問題是,當我通過命令列運行 Spring Boot 應用程式時
mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev -Dserver.port=8083"
這作業正常,但在 intellij 中作為應用程式運行時出現以下錯誤 -
Application run failed,
exc.stack=org.springframework.context.ApplicationContextException:
Unable to start web server; nested exception is org.springframework.context.ApplicationContextException:
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:155)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
可能的原因是什么,我應該在哪里查看配置修復?
關于這個模式還有其他問題,但他們都沒有提到錯誤——

轉載請註明出處,本文鏈接:https://www.uj5u.com/net/336824.html
