0
で休止状態を設定する方法Hibernate設定を使用して、エラーの下に取得春ブーツ
Parameter 0 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.
- Bean method 'dataSource' not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
- Bean method 'dataSource' not loaded because @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) did not find any beans
処置:
上記の条件を見直すか、タイプのBeanのはjavax.sql.DataSource」を定める考えてみましょうあなたの構成。
spring.jpa.hibernate.ddl-auto=create-drop
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:ORCL
spring.datasource.username=system
spring.datasource.password=****
spring.datasource.driver-class-oracle.jdbc.driver.OracleDriver
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = update
spring.jpa.hibernate.naming-strategy =
org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
私は除外から除外しようとしましたが、同じエラーが発生しています。これはデフォルトでDataSourceを指定する必要がありますか? – user3199286