有很多关于JPA处理的驼峰和弹簧的例子,但我更喜欢spring boot自动配置数据源而不是XML或配置类。
但即使是
spring:
datasource:
url: jdbc:postgresql://postgres/fooBarBaz
username: fooBarBaz
password: fooBarBaz
jpa:
hibernate:
ddl-auto: update
naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
设置
未提取数据源:
No qualifying bean of type [javax.sql.DataSource] found for dependency: expected at least 1 bean which qualifies as auto wire candidate for this dependency.