SpringBoot入门-10(springboot配置freemarker模板)

系列教程都是从网络上收集和本人的理解所编辑而成,仅供广大爱好者学习所用,请尊重本人的劳动成果。欢迎评论指正和转帖!(请保留连接谢谢!)


一、application.properties

########################################################
###datasource -- \u6307\u5b9amysql\u6570\u636e\u5e93\u8fde\u63a5\u4fe1\u606f.
########################################################
spring.datasource.url = jdbc:mysql://localhost:3306/springboot_test
spring.datasource.username = root
spring.datasource.password = fengsi
spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.datasource.max-active=20
spring.datasource.max-idle=8
spring.datasource.min-idle=8
spring.datasource.initial-size=10


########################################################
### Java Persistence Api --  Spring jpa\u7684\u914d\u7f6e\u4fe1\u606f.
########################################################
# Specify the DBMS
spring.jpa.database = MYSQL
# Show or not log for each sql query
spring.jpa.show-sql = true
# Hibernate ddl auto (create, create-drop, update)
spring.jpa.hibernate.ddl-auto = update
# Naming strategy
#[org.hibernate.cfg.ImprovedNamingStrategy  #org.hibernate.cfg.DefaultNamingStrategy]
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
# stripped before adding them to the entity manager)
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect



########################################################
### peizhi 
########################################################
server.port = 8080
#server.context-path = /springboot


########################################################
###FREEMARKER (FreeMarkerAutoConfiguration)
########################################################
spring.freemarker.allow-request-override=false
spring.freemarker.cache=false
spring.freemarker.check-template-location=true
spring.freemarker.charset=UTF-8
spring.freemarker.content-type=text/html
spring.freemarker.expose-request-attributes=false
spring.freemarker.expose-session-attributes=false
spring.freemarker.expose-spring-macro-helpers=false
#spring.freemarker.prefix=
#spring.freemarker.request-context-attribute=
#spring.freemarker.settings.*=
spring.freemarker.suffix=.ftl
#spring.freemarker.template-loader-path=classpath:/templates/ #comma-separated list
#spring.freemarker.view-names= # whitelist of view names that can be resolved




二、POM.XML


	4.0.0
	com.fs
	springboot_freemarker_10
	war
	0.0.1-SNAPSHOT
	springboot_freemarker_10 Maven Webapp
	http://maven.apache.org
	
		org.springframework.boot
		spring-boot-starter-parent
		1.4.1.RELEASE
	
	
		UTF-8
		
		1.8
	
	
		
		
			com.alibaba
			fastjson
			1.2.15
		
		
		
			org.springframework.boot
			spring-boot-starter-web
			
		
		
			org.springframework.boot
			spring-boot-devtools
			true
			true
		

		
		
			mysql
			mysql-connector-java
		
		
		
			org.springframework.boot
			spring-boot-starter-data-jpa
		

		
		
			org.springframework.boot
			spring-boot-starter-freemarker
		
		
		
			junit
			junit
			3.8.1
			test
		
	
	
		springboot_freemarker_10
		
			
			
			
				org.springframework.boot
				spring-boot-maven-plugin
				
					true
				
			
		
	





你可能感兴趣的:(SpringBoot)