出现如下出错时:
java.sql.SQLException: The Network Adapter could not establish the connection
org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
很大可能是application.properties配置不正确。
以Oracle为例,建议尝试下使用如下配置:
spring.jpa.database=oracle
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
#填自己的
spring.datasource.url=jdbc:oracle:thin:@192.168.1.102:1666:xe
spring.datasource.username=帐号
spring.datasource.password=密码
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jackson.serialization.indent_output=true