jhipster Oracle数据库连接

时间:2014-05-01 13:02:45

标签: oracle liquibase jhipster

我似乎无法让Liquibase对抗oracle。

我的application-dev.yml有:

spring:
  profiles: dev
  datasource:
    dataSourceClassName: oracle.jdbc.pool.OracleDataSource
    url: jdbc:oracle:thin:@localhost:1521:orcl
    username: rest_test
    password: rest_test

  jpa:
    database-platform: org.hibernate.dialect.OracleDialect
    database: ORACLE
    openInView: false
    show_sql: true
    generate-ddl: false
    hibernate:
    ddl-auto: none

但我收到了:

[DEBUG] com.steve.config.DatabaseConfiguration - Configuring Datasource
[ERROR] com.zaxxer.hikari.util.PropertyBeanSetter - Property url is does not exist on target    class class oracle.jdbc.pool.OracleDataSource

这很奇怪,因为该类似乎有一个url属性:

[btuser@localhost pool]$ strings OracleDataSource.class | grep -i seturl
setURL

有什么想法吗?

由于

1 个答案:

答案 0 :(得分:4)

现在修复此问题,此配置现在可以使用:

spring:
  profiles: dev
  datasource:
    driverClassName: oracle.jdbc.OracleDriver
    dataSourceClassName: oracle.jdbc.pool.OracleDataSource
    url: jdbc:oracle:thin:@localhost:1521:orcl
    username: rest_test
    password: rest_test

  jpa:
    database-platform: org.hibernate.dialect.Oracle10gDialect
    database: ORACLE
    openInView: false
    show_sql: true
    generate-ddl: false
    hibernate:
        ddl-auto: none
        naming-strategy: org.hibernate.cfg.EJB3NamingStrategy
    properties:
        hibernate.cache.use_second_level_cache: true
        hibernate.cache.use_query_cache: false
        hibernate.generate_statistics: false
        hibernate.cache.region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory