IntelliJ IDEA 2017版 加载springloaded-1.2.4.RELEASE.jar实现热部署
1、配置pom.xml文档(详见:http://www.cnblogs.com/liuyangfirst/p/8318664.html)
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4 <modelVersion>4.0.0</modelVersion> 5 6 <groupId>com.easytest</groupId> 7 <artifactId>rebushu</artifactId> 8 <version>0.0.1-SNAPSHOT</version> 9 <packaging>jar</packaging> 10 11 <name>rebushu</name> 12 <url>http://maven.apache.org</url> 13 <description>Demo project for Spring Boot</description> 14 15 <parent> 16 <groupId>org.springframework.boot</groupId> 17 <artifactId>spring-boot-starter-parent</artifactId> 18 <version>1.5.9.RELEASE</version> 19 <relativePath/> <!-- lookup parent from repository --> 20 </parent> 21 22 <properties> 23 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 24 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> 25 <java.version>1.8</java.version> 26 </properties> 27 28 <dependencies> 29 <dependency> 30 <groupId>org.springframework.boot</groupId> 31 <artifactId>spring-boot-starter-web</artifactId> 32 </dependency> 33 34 <dependency> 35 <groupId>org.springframework.boot</groupId> 36 <artifactId>spring-boot-starter-test</artifactId> 37 <scope>test</scope> 38 </dependency> 39 <dependency> 40 <groupId>com.alibaba</groupId> 41 <artifactId>fastjson</artifactId> 42 <version>1.2.15</version> 43 </dependency> 44 45 </dependencies> 46 47 <!--构建节点--> 48 <build> 49 <plugins> 50 <plugin> 51 <groupId>org.springframework.boot</groupId> 52 <artifactId>spring-boot-maven-plugin</artifactId> 53 54 </plugin> 55 56 </plugins> 57 </build> 58 59 </project>
2、书写测试代码pojo(实体类)
3、书写测试服务器
4、书写controller代码
5、编译器配置
6、新建文件夹,传入包
7、maven启动,在编译器右侧栏点开右侧栏
8、访问网页测试一下是否联通
9、controller中加如下内容,然后F5刷新界面,如图就是成功实现热部署
十年磨一剑,一剑破万法