Spring Boot 配置Oracle数据库

1、添加oralce 依赖包,仓库没有则通过maven装载到本地仓库;
  

2、application.properties 中添加配置,特别是第一个配置项要严重注意!

#配置Spring Data JPA
spring.jpa.database=oracle 
spring.jpa.show-sql=true 
spring.jpa.hibernate.ddl-auto=update

#配置oracle驱动以及数据库用例
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:@localhost:1521/orcl
spring.datasource.username=CORE
spring.datasource.password=nicai

你可能感兴趣的:(spring,boot)