1.pom.xml文件中改变SpringBoot配置到1.4.0
2.可能出现Failure to transfer commons-lang:commons-lang:jar:2.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact commons-lang:commons-lang:jar:2.1 from/to central (https://repo.maven.apache.org/maven2): The operation was cancelled.
解决:点击菜单的 Window→preferences→meaven→User Settings,在Global Settings: 中 点击Browse...,添加maven工程中的settings.xml路径,问题解决。
3.添加velocity依赖包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-velocity</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>2.0</version>
</dependency>