Добрай день. Сделал пустой проект в IntelliJ IDEA, запускаю в нем все работает, но как только собираю в .jar перестает запускаться и выдает ошибку "ERROR org.springframework.boot.SpringApplication - Application run failed
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.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(
ServletWebServerApplicationContext.java:163)
at org.springframework.context.support.AbstractApplicationContext.refresh(
AbstractApplicationContext.java:577)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(
ServletWebServerApplicationContext.java:145)
at org.springframework.boot.SpringApplication.refresh(
SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(
SpringApplication.java:434)
at
org.springframework.boot.SpringApplication.run(
SpringApplication.java:338)
at
org.springframework.boot.SpringApplication.run(
SpringApplication.java:1343)
at
org.springframework.boot.SpringApplication.run(
SpringApplication.java:1332)
at com.bpm.carloans.Application.main(
Application.java:12)
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(
ServletWebServerApplicationContext.java:210)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(
ServletWebServerApplicationContext.java:180)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(
ServletWebServerApplicationContext.java:160)
... 8 common frames omitted"