springboot和freemarker开发web应用
1、创建springboot项目,导入web开发包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-freemarker</artifactId> </dependency> 2、application.properties添加freemarker配置项 spring.freemarker.enabled=true spring.freemarker.cache=false spring.freemarker.charset=UTF-8 spring.freemarker.content-type=text/html spring.freemarker.suffix=.ftl spring.freemarker.check-template-location=true spring.freemarker.template-loader-path=classpath:/templates spring