构建SpringBoot-web工程的步骤,以及热部署问题


创建一个springboot-web工程的步骤:


1、创建一个maven工程
2、引入springboot依赖的parent坐标(springboot_start_parent)以及web工功能spring_start_parent_web)的坐标
3、编写springboot的引导类,并使用注解@SpringBootApplication声明为引导类,创建一个main方法,使用SpringApplication.run()方法加载该类的字节码文件
4、编写代码

springboot-web的热部署问题:

只需要一步:
添加springboot的热部署依赖:

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

关于热部署不成功(mac):
preference→complie→build project automatically勾选
shift+option+command+/ → Registry →compiler.automake.allow.when.app.running勾选

猜你喜欢

转载自blog.csdn.net/weixin_43794897/article/details/84493555
今日推荐