我正在尝试启动 Spring Boot 服务,但收到此错误:
无法解析类型 org.springframework.data.repository.config.BootstrapMode。它是从所需的.class文件间接引用的
知道如何解决吗?
这是 eclipse 所说的问题所在的类:
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(
entityManagerFactoryRef = "oracleCentralEntityManagerFactory",
basePackages = { "es.eci.amv.repository.oracleCentral" })
public class OracleCentralConfig {
@Bean(name = "oracleCentralDataSource")
@ConfigurationProperties(prefix="spring.oracle-central.datasource")
public DataSource oracleCentralDataSource() {
return DataSourceBuilder.create().build();
}
@Bean(name = "oracleCentralEntityManagerFactory")
public LocalContainerEntityManagerFactoryBean oracleCentralEntityManagerFactory(
EntityManagerFactoryBuilder builder,
@Qualifier("oracleCentralDataSource") DataSource oracleCentralDataSource) {
return builder
.dataSource(oracleCentralDataSource)
.packages("es.eci.amv.model.oracleCentral")
.persistenceUnit("oracle-central")
.build();
}
@Bean(name = "oracleCentralTransactionManager")
public PlatformTransactionManager oracleCentralTransactionManager(
@Qualifier("oracleCentralEntityManagerFactory") EntityManagerFactory oracleCentralEntityManagerFactory) {
return new JpaTransactionManager(oracleCentralEntityManagerFactory);
}
}
最佳答案
您必须将org.springframework.data的版本更改为Spring boot版本。
关于java - Spring启动 org.springframework.data.repository.config.BootstrapMode,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62324301/