本文整理汇总了Java中org.springframework.boot.autoconfigure.data.jpa.city.CityRepository类的典型用法代码示例。如果您正苦于以下问题:Java CityRepository类的具体用法?Java CityRepository怎么用?Java CityRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CityRepository类属于org.springframework.boot.autoconfigure.data.jpa.city包,在下文中一共展示了CityRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testDefaultRepositoryConfiguration
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(TestConfiguration.class,
EmbeddedDataSourceConfiguration.class,
HibernateJpaAutoConfiguration.class,
JpaRepositoriesAutoConfiguration.class,
SpringDataWebAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
assertThat(this.context.getBean(PageableHandlerMethodArgumentResolver.class))
.isNotNull();
assertThat(this.context.getBean(FormattingConversionService.class)
.canConvert(Long.class, City.class)).isTrue();
}
示例2: testDefaultRepositoryConfiguration
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext());
this.context.register(TestConfiguration.class,
EmbeddedDataSourceConfiguration.class,
HibernateJpaAutoConfiguration.class,
JpaRepositoriesAutoConfiguration.class,
SpringDataWebAutoConfiguration.class,
PropertyPlaceholderAutoConfiguration.class);
this.context.refresh();
assertNotNull(this.context.getBean(CityRepository.class));
assertNotNull(this.context.getBean(PageableHandlerMethodArgumentResolver.class));
assertTrue(this.context.getBean(FormattingConversionService.class)
.canConvert(Long.class, City.class));
}
示例3: testMixedRepositoryConfiguration
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testMixedRepositoryConfiguration() throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(MixedConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:MixedMongoRepositoriesAutoConfigurationTests.java
示例4: testMixedRepositoryConfigurationWithDeprecatedEntityScan
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testMixedRepositoryConfigurationWithDeprecatedEntityScan()
throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(MixedConfigurationWithDeprecatedEntityScan.class,
BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:13,代码来源:MixedMongoRepositoriesAutoConfigurationTests.java
示例5: testJpaRepositoryConfigurationWithMongoTemplate
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithMongoTemplate() throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(JpaConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:MixedMongoRepositoriesAutoConfigurationTests.java
示例6: testJpaRepositoryConfigurationWithMongoTemplateAndDeprecatedEntityScan
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithMongoTemplateAndDeprecatedEntityScan()
throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(JpaConfigurationWithDeprecatedEntityScan.class,
BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:MixedMongoRepositoriesAutoConfigurationTests.java
示例7: testJpaRepositoryConfigurationWithMongoOverlap
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithMongoOverlap() throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:MixedMongoRepositoriesAutoConfigurationTests.java
示例8: testJpaRepositoryConfigurationWithMongoOverlapDisabled
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithMongoOverlapDisabled()
throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false",
"spring.data.mongodb.repositories.enabled:false");
this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:MixedMongoRepositoriesAutoConfigurationTests.java
示例9: testMixedRepositoryConfiguration
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testMixedRepositoryConfiguration() throws Exception {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(MixedConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CountryRepository.class)).isNotNull();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:MixedNeo4jRepositoriesAutoConfigurationTests.java
示例10: testJpaRepositoryConfigurationWithNeo4jTemplate
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithNeo4jTemplate() throws Exception {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(JpaConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:MixedNeo4jRepositoriesAutoConfigurationTests.java
示例11: testJpaRepositoryConfigurationWithNeo4jOverlap
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
@Ignore
public void testJpaRepositoryConfigurationWithNeo4jOverlap() throws Exception {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:MixedNeo4jRepositoriesAutoConfigurationTests.java
示例12: testJpaRepositoryConfigurationWithNeo4jOverlapDisabled
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithNeo4jOverlapDisabled()
throws Exception {
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false",
"spring.data.neo4j.repositories.enabled:false");
this.context.register(OverlapConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:MixedNeo4jRepositoriesAutoConfigurationTests.java
示例13: testDefaultRepositoryConfiguration
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testDefaultRepositoryConfiguration() throws Exception {
prepareApplicationContext(TestConfiguration.class);
assertThat(this.context.getBean(CityRepository.class)).isNotNull();
assertThat(this.context.getBean(PlatformTransactionManager.class)).isNotNull();
assertThat(this.context.getBean(EntityManagerFactory.class)).isNotNull();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:9,代码来源:JpaRepositoriesAutoConfigurationTests.java
示例14: testMixedRepositoryConfiguration
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testMixedRepositoryConfiguration() throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(MixedConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertNotNull(this.context.getBean(CountryRepository.class));
assertNotNull(this.context.getBean(CityRepository.class));
}
示例15: testJpaRepositoryConfigurationWithMongoTemplate
import org.springframework.boot.autoconfigure.data.jpa.city.CityRepository; //导入依赖的package包/类
@Test
public void testJpaRepositoryConfigurationWithMongoTemplate() throws Exception {
this.context = new AnnotationConfigApplicationContext();
EnvironmentTestUtils.addEnvironment(this.context,
"spring.datasource.initialize:false");
this.context.register(JpaConfiguration.class, BaseConfiguration.class);
this.context.refresh();
assertNotNull(this.context.getBean(CityRepository.class));
}