当前位置: 首页>>代码示例>>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;未经允许,请勿转载。