Spring开机org.springframework.data.repository.config.BootstrapMode

Spring boot org.springframework.data.repository.config.BootstrapMode

我正在尝试启动 spring 引导服务,但出现此错误:

无法解析类型 org.springframework.data.repository.config.BootstrapMode。它是从所需的 .class 个文件

中间接引用的

知道如何解决吗?

这就是 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 引导版本。