【发布时间】:2014-10-21 06:14:45
【问题描述】:
如何启动一个独立的 Spring Boot JPA 应用程序——而不是通过 cli——选择数据库来获取数据,例如 localhost:5432/my_db;或 192.168.1.100:5432/our_db,还是 example.com:5432/their_db?
我的当前使用的是 application.properties 文件中包含的一个:
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/my_db
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.generate-ddl=true
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=create
提前致谢
【问题讨论】:
-
将如何选择?标准是什么?
标签: postgresql jpa spring-boot