pom 文件引入如下:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency>
Maven 打包的名字 <build> <finalName>springboot-vue</finalName> </build>
修改springboot 启动类如下
@SpringBootApplication @ServletComponentScan public class SpringbootVueApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(SpringbootVueApplication.class, args); } }