我正在构建一个Spring-Boot 2.3.1应用程序,该应用程序使用基于文件的HSQL数据库进行测试。 application.properties
包含以下数据库配置:
spring.datasource.url=jdbc:hsqldb:file:/db/trainingdata
spring.datasource.username=sa
spring.datasource.password=
但是,Hibernate似乎没有采取任何措施。我可以完成删除或使每行无效的操作。遵循日志摘录:
....mmr.ApplicationTest : No active profile set, falling back to default profiles: default
.s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
.s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 94ms. Found 1 repository interfaces.
com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
hsqldb.db.HSQLDB6A89996F0E.ENGINE : checkpointClose start
hsqldb.db.HSQLDB6A89996F0E.ENGINE : checkpointClose synched
hsqldb.db.HSQLDB6A89996F0E.ENGINE : checkpointClose script done
hsqldb.db.HSQLDB6A89996F0E.ENGINE : checkpointClose end
com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Driver does not support get/set network timeout for connections. (feature not supported)
com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
org.hibernate.Version : HHH000412: Hibernate Core {5.3.7.Final}
org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.HSQLDialect
j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
....mmr.ApplicationTest : Started ApplicationTest in 4.133 seconds (JVM running for 5.115)
o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
application.properties
值 被用于其他用途,因此该文件通常可以正常工作。任何想法为什么会发生这种情况?
谢谢!