本文整理匯總了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));
}