1.創建項目
直接點下一步 原因: 不勾選 Create from archetype,是項目創建的骨架的時候,由於不知道什么原因就卡住了,一直在刷新
2.創建之后完成之后
添加依賴
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.5.RELEASE</version>
</parent>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--- 下面是配置freemarker的依賴 START-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<!--- 下面是配置freemarker的依賴 END-->
3.將配置文件配置端口
server.port=8089
spring.freemarker.settings.classic_compatible=true
如果將文件需要重新放置文件夾的路徑:spring.freemarker.template-loader-path=classpath:/webapp/templates/
4.項目啟動完成,顯示.