Merge branch '1.5.x'
This commit is contained in:
@@ -16,9 +16,7 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.batch;
|
||||
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
|
||||
/**
|
||||
* Configuration properties for Spring Batch.
|
||||
@@ -48,9 +46,6 @@ public class BatchProperties {
|
||||
|
||||
private final Job job = new Job();
|
||||
|
||||
@NestedConfigurationProperty
|
||||
private final TransactionProperties transaction = new TransactionProperties();
|
||||
|
||||
public String getSchema() {
|
||||
return this.schema;
|
||||
}
|
||||
@@ -75,10 +70,6 @@ public class BatchProperties {
|
||||
return this.job;
|
||||
}
|
||||
|
||||
public TransactionProperties getTransaction() {
|
||||
return this.transaction;
|
||||
}
|
||||
|
||||
public class Initializer {
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,9 +23,7 @@ import org.neo4j.ogm.config.Configuration;
|
||||
import org.neo4j.ogm.config.DriverConfiguration;
|
||||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.util.ClassUtils;
|
||||
@@ -71,9 +69,6 @@ public class Neo4jProperties implements ApplicationContextAware {
|
||||
|
||||
private final Embedded embedded = new Embedded();
|
||||
|
||||
@NestedConfigurationProperty
|
||||
private final TransactionProperties transaction = new TransactionProperties();
|
||||
|
||||
private ClassLoader classLoader = Neo4jProperties.class.getClassLoader();
|
||||
|
||||
public String getUri() {
|
||||
@@ -112,10 +107,6 @@ public class Neo4jProperties implements ApplicationContextAware {
|
||||
return this.embedded;
|
||||
}
|
||||
|
||||
public TransactionProperties getTransaction() {
|
||||
return this.transaction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext ctx) throws BeansException {
|
||||
this.classLoader = ctx.getClassLoader();
|
||||
|
||||
@@ -20,6 +20,9 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.ResolvableType;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
@@ -31,6 +34,9 @@ import org.springframework.transaction.PlatformTransactionManager;
|
||||
*/
|
||||
public class TransactionManagerCustomizers {
|
||||
|
||||
private static final Log logger = LogFactory
|
||||
.getLog(TransactionManagerCustomizers.class);
|
||||
|
||||
private final List<PlatformTransactionManagerCustomizer<?>> customizers;
|
||||
|
||||
public TransactionManagerCustomizers(
|
||||
@@ -56,7 +62,17 @@ public class TransactionManagerCustomizers {
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
private void customize(PlatformTransactionManager transactionManager,
|
||||
PlatformTransactionManagerCustomizer customizer) {
|
||||
customizer.customize(transactionManager);
|
||||
try {
|
||||
customizer.customize(transactionManager);
|
||||
}
|
||||
catch (ClassCastException ex) {
|
||||
// Possibly a lambda-defined listener which we could not resolve the generic
|
||||
// event type for
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Non-matching transaction manager type for customizer: "
|
||||
+ customizer, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user