11月 08 将maven项目改造成springboot项目 springboot pom.xml配置之springboot 1.1 继承springboot父项目依赖 123456<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.7.0</version> <relativePath/> <!-- lookup parent from repository --></parent> 1.2 插件依赖 1234567891011121314151617 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency></dependencies> 启动类配置 123456@SpringBootApplicationpublic class SquareApplication { public static void main(String[] args) { SpringApplication.run(SquareApplication.class,args); }} application.yml 上一篇 Field restTemplate in cn.itcast.order.service.OrderService required a bean of ty 下一篇 nohup命令让服务器上的程序在后台一直运行,退出终端也可以保持程序运行