Springboot 配置H2数据库

1. 配置文件

	spring.thymeleaf.cache=false
	spring.resources.cache-period=0
	server.port=80
	 
	spring.datasource.url=jdbc:h2:file:./db/test01
	#spring.datasource.url=jdbc:h2:mem:test
	#spring.datasource.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
	spring.datasource.driverClassName=org.h2.Driver
	spring.datasource.username=sa
	spring.datasource.password=
	 
	#spring.datasource.schema=classpath:db/schema.sql
	#resources/db/schema.sql
	#spring.datasource.data=classpath:db/data.sql    
	#resources/db/data.sql
	 
	spring.h2.console.settings.web-allow-others=true
	spring.h2.console.path=/h2
	spring.h2.console.enabled=true
	 
	spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
	spring.jpa.generate-ddl=true
	spring.jpa.show-sql=true
	spring.jpa.hibernate.ddl-auto=update
	spring.datasource.platform=h2
	 
	logging.level.root=INFO
	logging.level.org.hibernate=INFO
	logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
	logging.level.org.hibernate.type.descriptor.sql.BasicExtractor=TRACE
	logging.level.com.sguess=DEBUG

 

2. 配置信息

 

3. 网页访问

       

     

    

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值