當前位置: 首頁>>代碼示例>>Java>>正文


Java PersistenceExceptionTranslationPostProcessor類代碼示例

本文整理匯總了Java中org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor的典型用法代碼示例。如果您正苦於以下問題:Java PersistenceExceptionTranslationPostProcessor類的具體用法?Java PersistenceExceptionTranslationPostProcessor怎麽用?Java PersistenceExceptionTranslationPostProcessor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PersistenceExceptionTranslationPostProcessor類屬於org.springframework.dao.annotation包,在下文中一共展示了PersistenceExceptionTranslationPostProcessor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: persistenceExceptionTranslationPostProcessor

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
@ConditionalOnMissingBean(PersistenceExceptionTranslationPostProcessor.class)
@ConditionalOnProperty(prefix = "spring.dao.exceptiontranslation", name = "enabled", matchIfMissing = true)
public static PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
	PersistenceExceptionTranslationPostProcessor postProcessor = new PersistenceExceptionTranslationPostProcessor();
	postProcessor.setProxyTargetClass(true);
	return postProcessor;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:9,代碼來源:PersistenceExceptionTranslationAutoConfiguration.java

示例2: exceptionTranslationPostProcessorBeanIsCreated

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Test
public void exceptionTranslationPostProcessorBeanIsCreated() {
	this.context = new AnnotationConfigApplicationContext(
			PersistenceExceptionTranslationAutoConfiguration.class);
	Map<String, PersistenceExceptionTranslationPostProcessor> beans = this.context
			.getBeansOfType(PersistenceExceptionTranslationPostProcessor.class);
	assertThat(beans).hasSize(1);
	assertThat(beans.values().iterator().next().isProxyTargetClass()).isTrue();
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:10,代碼來源:PersistenceExceptionTranslationAutoConfigurationTests.java

示例3: exceptionTranslationPostProcessorBeanIsDisabled

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Test
public void exceptionTranslationPostProcessorBeanIsDisabled() {
	this.context = new AnnotationConfigApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context,
			"spring.dao.exceptiontranslation.enabled=false");
	this.context.register(PersistenceExceptionTranslationAutoConfiguration.class);
	this.context.refresh();
	Map<String, PersistenceExceptionTranslationPostProcessor> beans = this.context
			.getBeansOfType(PersistenceExceptionTranslationPostProcessor.class);
	assertThat(beans.entrySet()).isEmpty();
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:PersistenceExceptionTranslationAutoConfigurationTests.java

示例4: exceptionTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {

    return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:abixen,項目名稱:abixen-platform,代碼行數:6,代碼來源:AbstractJpaConfiguration.java

示例5: exceptionTranslationPostProcessorBeanIsCreated

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Test
public void exceptionTranslationPostProcessorBeanIsCreated() {
	this.context = new AnnotationConfigApplicationContext(
			PersistenceExceptionTranslationAutoConfiguration.class);
	Map<String, PersistenceExceptionTranslationPostProcessor> beans = this.context
			.getBeansOfType(PersistenceExceptionTranslationPostProcessor.class);
	assertThat(beans.size(), is(equalTo(1)));
	assertThat(beans.values().iterator().next().isProxyTargetClass(), equalTo(true));
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:10,代碼來源:PersistenceExceptionTranslationAutoConfigurationTests.java

示例6: exceptionTranslationPostProcessorBeanIsDisabled

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Test
public void exceptionTranslationPostProcessorBeanIsDisabled() {
	this.context = new AnnotationConfigApplicationContext();
	EnvironmentTestUtils.addEnvironment(this.context,
			"spring.dao.exceptiontranslation.enabled=false");
	this.context.register(PersistenceExceptionTranslationAutoConfiguration.class);
	this.context.refresh();
	Map<String, PersistenceExceptionTranslationPostProcessor> beans = this.context
			.getBeansOfType(PersistenceExceptionTranslationPostProcessor.class);
	assertThat(beans.entrySet(), empty());
}
 
開發者ID:Nephilim84,項目名稱:contestparser,代碼行數:12,代碼來源:PersistenceExceptionTranslationAutoConfigurationTests.java

示例7: persistenceExceptionTranslationPostProcessor

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@RefreshScope
@Bean
public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:6,代碼來源:GoogleAuthenticatorMongoDbConfiguration.java

示例8: persistenceMfaTrustedAuthnExceptionTranslationPostProcessor

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@RefreshScope
@Bean
public PersistenceExceptionTranslationPostProcessor persistenceMfaTrustedAuthnExceptionTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:6,代碼來源:MongoDbMultifactorAuthenticationTrustConfiguration.java

示例9: exceptionTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:ArturWisniewski,項目名稱:ToDoApp-Spring,代碼行數:5,代碼來源:HibernateConfig.java

示例10: exceptionTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){
return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:juanjo8600,項目名稱:restaurant,代碼行數:5,代碼來源:RepositoryConfiguration.java

示例11: exceptionTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
	return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:crnk-project,項目名稱:crnk-framework,代碼行數:5,代碼來源:JpaTestConfig.java

示例12: persistenceTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
/**
 * Bean that translates SQL exceptions into Spring unified data-access exceptions
 * @return Bean
 */
@Bean
public BeanPostProcessor persistenceTranslation(){
    return  new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:Vapsel,項目名稱:social-media-analytic-system,代碼行數:9,代碼來源:DataSourceConfig.java

示例13: exceptionTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation()
{
	return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:tairmansd,項目名稱:CriteriaBuilder,代碼行數:6,代碼來源:PersistenceJPAConfig.java

示例14: exceptionTranslator

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslator() {
    return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:xSzymo,項目名稱:Spring-web-shop-project,代碼行數:5,代碼來源:DataBaseConfiguration.java

示例15: exceptionTranslation

import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; //導入依賴的package包/類
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){
    return new PersistenceExceptionTranslationPostProcessor();
}
 
開發者ID:aranga-nana,項目名稱:angular-spring-boot-micro-services-docker,代碼行數:5,代碼來源:JPAConfig.java


注:本文中的org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。