Java 类org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
    List<String> names = new ArrayList<String>();
    for (Class<?> type : new Class<?>[] { DataSourceAutoConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class, MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class,
            MongoRepositoriesAutoConfiguration.class }) {
        names.add(type.getName());
    }
    return names.toArray(new String[0]);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
    List<String> names = new ArrayList<String>();
    for (Class<?> type : new Class<?>[] { DataSourceAutoConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class,
            Neo4jDataAutoConfiguration.class,
            Neo4jRepositoriesAutoConfiguration.class }) {
        names.add(type.getName());
    }
    return names.toArray(new String[names.size()]);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:CloudAutoConfigurationTests.java   
@Test
public void testOrder() throws Exception {
    TestAutoConfigurationSorter sorter = new TestAutoConfigurationSorter(
            new CachingMetadataReaderFactory());
    Collection<String> classNames = new ArrayList<String>();
    classNames.add(MongoAutoConfiguration.class.getName());
    classNames.add(DataSourceAutoConfiguration.class.getName());
    classNames.add(MongoRepositoriesAutoConfiguration.class.getName());
    classNames.add(JpaRepositoriesAutoConfiguration.class.getName());
    classNames.add(CloudAutoConfiguration.class.getName());
    List<String> ordered = sorter.getInPriorityOrder(classNames);
    assertThat(ordered.get(0)).isEqualTo(CloudAutoConfiguration.class.getName());
}
项目:spring-boot-concourse    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
    List<String> names = new ArrayList<String>();
    for (Class<?> type : new Class<?>[] { DataSourceAutoConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class, MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class,
            MongoRepositoriesAutoConfiguration.class }) {
        names.add(type.getName());
    }
    return names.toArray(new String[0]);
}
项目:spring-boot-concourse    文件:MixedNeo4jRepositoriesAutoConfigurationTests.java   
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
    List<String> names = new ArrayList<String>();
    for (Class<?> type : new Class<?>[] { DataSourceAutoConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class, Neo4jAutoConfiguration.class,
            Neo4jRepositoriesAutoConfiguration.class }) {
        names.add(type.getName());
    }
    return names.toArray(new String[names.size()]);
}
项目:spring-boot-concourse    文件:CloudAutoConfigurationTests.java   
@Test
public void testOrder() throws Exception {
    TestAutoConfigurationSorter sorter = new TestAutoConfigurationSorter(
            new CachingMetadataReaderFactory());
    Collection<String> classNames = new ArrayList<String>();
    classNames.add(MongoAutoConfiguration.class.getName());
    classNames.add(DataSourceAutoConfiguration.class.getName());
    classNames.add(MongoRepositoriesAutoConfiguration.class.getName());
    classNames.add(JpaRepositoriesAutoConfiguration.class.getName());
    classNames.add(CloudAutoConfiguration.class.getName());
    List<String> ordered = sorter.getInPriorityOrder(classNames);
    assertThat(ordered.get(0)).isEqualTo(CloudAutoConfiguration.class.getName());
}
项目:contestparser    文件:MixedMongoRepositoriesAutoConfigurationTests.java   
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
    List<String> names = new ArrayList<String>();
    for (Class<?> type : new Class<?>[] { DataSourceAutoConfiguration.class,
            HibernateJpaAutoConfiguration.class,
            JpaRepositoriesAutoConfiguration.class, MongoAutoConfiguration.class,
            MongoDataAutoConfiguration.class,
            MongoRepositoriesAutoConfiguration.class }) {
        names.add(type.getName());
    }
    return names.toArray(new String[0]);
}
项目:contestparser    文件:CloudAutoConfigurationTests.java   
@Test
public void testOrder() throws Exception {
    ResourceLoader loader = new DefaultResourceLoader();
    TestAutoConfigurationSorter sorter = new TestAutoConfigurationSorter(loader);
    Collection<String> classNames = new ArrayList<String>();
    classNames.add(MongoAutoConfiguration.class.getName());
    classNames.add(DataSourceAutoConfiguration.class.getName());
    classNames.add(MongoRepositoriesAutoConfiguration.class.getName());
    classNames.add(JpaRepositoriesAutoConfiguration.class.getName());
    classNames.add(CloudAutoConfiguration.class.getName());
    List<String> ordered = sorter.getInPriorityOrder(classNames);
    assertThat(ordered.get(0), equalTo(CloudAutoConfiguration.class.getName()));
}