1.建立項目web
直接點下一步 緣由: 不勾選 Create from archetype,是項目建立的骨架的時候,因爲不知道什麼緣由就卡住了,一直在刷新spring
2.建立以後完成以後app
添加依賴webapp
<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.項目啓動完成,顯示.