springboot jar打包部署linux 出现 org.springframework.context.ApplicationContextException: Unable to start web server; nested excep...

解决办法:

1. 在pom.xml中必须添加依赖

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

2.启动类上必须添加注解@Controller

3.启动类上必须添加注解@EnableAutoConfiguration 和 @SpringBootApplication 

原文地址:https://www.cnblogs.com/nongzihong/p/15398500.html