Java 类org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PersistenceExceptionTranslationAutoConfiguration.java   
@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;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PersistenceExceptionTranslationAutoConfigurationTests.java   
@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();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PersistenceExceptionTranslationAutoConfigurationTests.java   
@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();
}
项目:abixen-platform    文件:AbstractJpaConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {

    return new PersistenceExceptionTranslationPostProcessor();
}
项目:spring-boot-concourse    文件:PersistenceExceptionTranslationAutoConfiguration.java   
@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;
}
项目:spring-boot-concourse    文件:PersistenceExceptionTranslationAutoConfigurationTests.java   
@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();
}
项目:spring-boot-concourse    文件:PersistenceExceptionTranslationAutoConfigurationTests.java   
@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();
}
项目:contestparser    文件:PersistenceExceptionTranslationAutoConfiguration.java   
@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;
}
项目:contestparser    文件:PersistenceExceptionTranslationAutoConfigurationTests.java   
@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));
}
项目:contestparser    文件:PersistenceExceptionTranslationAutoConfigurationTests.java   
@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());
}
项目:cas-5.1.0    文件:GoogleAuthenticatorMongoDbConfiguration.java   
@RefreshScope
@Bean
public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:cas-5.1.0    文件:MongoDbEventsConfiguration.java   
@RefreshScope
@Bean
public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:cas-5.1.0    文件:MongoDbMultifactorAuthenticationTrustConfiguration.java   
@RefreshScope
@Bean
public PersistenceExceptionTranslationPostProcessor persistenceMfaTrustedAuthnExceptionTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:ToDoApp-Spring    文件:HibernateConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:restaurant    文件:RepositoryConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){
return new PersistenceExceptionTranslationPostProcessor();
}
项目:crnk-framework    文件:JpaTestConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:crnk-framework    文件:OperationsTestConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:social-media-analytic-system    文件:DataSourceConfig.java   
/**
 * Bean that translates SQL exceptions into Spring unified data-access exceptions
 * @return Bean
 */
@Bean
public BeanPostProcessor persistenceTranslation(){
    return  new PersistenceExceptionTranslationPostProcessor();
}
项目:CriteriaBuilder    文件:PersistenceJPAConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation()
{
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:Spring-web-shop-project    文件:DataBaseConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslator() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:TicketServer    文件:SpringBusinessConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:angular-spring-boot-micro-services-docker    文件:JPAConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:oma-riista-web    文件:JPAConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:ismartonline    文件:JPAConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation()
{
   return new PersistenceExceptionTranslationPostProcessor();
}
项目:ismartonline    文件:JPAProductionConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation()
{
   return new PersistenceExceptionTranslationPostProcessor();
}
项目:pswot-cloud-java-spring-webapp    文件:JPAConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:spring-security-angularjs    文件:JPAConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:spring4-understanding    文件:ScheduledAndTransactionalAnnotationIntegrationTests.java   
@Bean
public PersistenceExceptionTranslationPostProcessor peTranslationPostProcessor() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:Joiner    文件:EntityManagerConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:facepalm    文件:DatabaseConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:restaurant    文件:RepositoryConfiguration.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation(){
return new PersistenceExceptionTranslationPostProcessor();
}
项目:imageboard    文件:Config.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:ddd-training    文件:AppConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:katharsis-framework    文件:TestConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:gest-ecole    文件:GestEcolePersistenceConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
  return new PersistenceExceptionTranslationPostProcessor();
}
项目:Spring-Framework-Essentials    文件:AppConfig.java   
@Bean
public BeanPostProcessor persistenceTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:Spring-Framework-Essentials    文件:AppConfig.java   
@Bean
public BeanPostProcessor persistenceTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:spring-security-registration    文件:PersistenceJPAConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:entelect-spring-webapp-template    文件:JPAConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}
项目:springJpaKata    文件:JpaConfig.java   
@Bean
public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
    return new PersistenceExceptionTranslationPostProcessor();
}