Merge branch '2.6.x' into 2.7.x
Closes gh-33226
This commit is contained in:
@@ -25,6 +25,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -45,7 +46,7 @@ import org.springframework.transaction.TransactionManager;
|
||||
* @author Kazuki Shimizu
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@AutoConfiguration(before = TransactionAutoConfiguration.class)
|
||||
@ConditionalOnClass({ JdbcTemplate.class, TransactionManager.class })
|
||||
@AutoConfigureOrder(Ordered.LOWEST_PRECEDENCE)
|
||||
@EnableConfigurationProperties(DataSourceProperties.class)
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
@@ -37,7 +38,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
* @author Andy Wilkinson
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@AutoConfiguration(after = { DataSourceAutoConfiguration.class })
|
||||
@AutoConfiguration(after = DataSourceAutoConfiguration.class, before = TransactionAutoConfiguration.class)
|
||||
@ConditionalOnClass({ LocalContainerEntityManagerFactoryBean.class, EntityManager.class, SessionImplementor.class })
|
||||
@EnableConfigurationProperties(JpaProperties.class)
|
||||
@Import(HibernateJpaConfiguration.class)
|
||||
|
||||
@@ -20,8 +20,6 @@ import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.NoneNestedConditions;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.sql.init.SqlInitializationAutoConfiguration.SqlInitializationModeCondition;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer;
|
||||
@@ -34,7 +32,7 @@ import org.springframework.context.annotation.Import;
|
||||
* @author Andy Wilkinson
|
||||
* @since 2.5.0
|
||||
*/
|
||||
@AutoConfiguration(after = { R2dbcAutoConfiguration.class, DataSourceAutoConfiguration.class })
|
||||
@AutoConfiguration
|
||||
@EnableConfigurationProperties(SqlInitializationProperties.class)
|
||||
@Import({ DatabaseInitializationDependencyConfigurer.class, R2dbcInitializationConfiguration.class,
|
||||
DataSourceInitializationConfiguration.class })
|
||||
|
||||
@@ -25,10 +25,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate;
|
||||
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -48,8 +44,7 @@ import org.springframework.transaction.support.TransactionTemplate;
|
||||
* @author Stephane Nicoll
|
||||
* @since 1.3.0
|
||||
*/
|
||||
@AutoConfiguration(after = { JtaAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
|
||||
DataSourceTransactionManagerAutoConfiguration.class, Neo4jDataAutoConfiguration.class })
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(PlatformTransactionManager.class)
|
||||
@EnableConfigurationProperties(TransactionProperties.class)
|
||||
public class TransactionAutoConfiguration {
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration
|
||||
import org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
/**
|
||||
@@ -35,7 +36,7 @@ import org.springframework.context.annotation.Import;
|
||||
* @since 1.2.0
|
||||
*/
|
||||
@AutoConfiguration(before = { XADataSourceAutoConfiguration.class, ActiveMQAutoConfiguration.class,
|
||||
ArtemisAutoConfiguration.class, HibernateJpaAutoConfiguration.class })
|
||||
ArtemisAutoConfiguration.class, HibernateJpaAutoConfiguration.class, TransactionAutoConfiguration.class })
|
||||
@ConditionalOnClass(javax.transaction.Transaction.class)
|
||||
@ConditionalOnProperty(prefix = "spring.jta", value = "enabled", matchIfMissing = true)
|
||||
@Import({ JndiJtaConfiguration.class, AtomikosJtaConfiguration.class })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,6 +27,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.jackson.types.Name;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
import org.springframework.boot.jackson.types.NameAndCareer;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -30,6 +30,8 @@ import org.springframework.boot.jackson.scan.a.RenameMixInClass;
|
||||
import org.springframework.boot.jackson.scan.b.RenameMixInAbstractClass;
|
||||
import org.springframework.boot.jackson.scan.c.RenameMixInInterface;
|
||||
import org.springframework.boot.jackson.scan.d.EmptyMixInClass;
|
||||
import org.springframework.boot.jackson.types.Name;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import com.fasterxml.jackson.databind.node.NullNode;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.jackson.NameAndAgeJsonComponent.Deserializer;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.jackson.NameAndAgeJsonComponent.Serializer;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,8 @@ import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
/**
|
||||
* Sample {@link JsonComponent @JsonComponent} used for tests.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,6 +24,8 @@ import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.KeyDeserializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
/**
|
||||
* Sample {@link JsonComponent @JsonComponent} used for tests.
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,9 @@ import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
|
||||
import org.springframework.boot.jackson.types.Name;
|
||||
import org.springframework.boot.jackson.types.NameAndCareer;
|
||||
|
||||
/**
|
||||
* Sample {@link JsonComponent @JsonComponent} used for tests.
|
||||
*
|
||||
|
||||
@@ -19,8 +19,8 @@ package org.springframework.boot.jackson.scan.a;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.springframework.boot.jackson.JsonMixin;
|
||||
import org.springframework.boot.jackson.Name;
|
||||
import org.springframework.boot.jackson.NameAndAge;
|
||||
import org.springframework.boot.jackson.types.Name;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
@JsonMixin(type = { Name.class, NameAndAge.class })
|
||||
public class RenameMixInClass {
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.boot.jackson.scan.b;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.springframework.boot.jackson.JsonMixin;
|
||||
import org.springframework.boot.jackson.NameAndAge;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
@JsonMixin(type = NameAndAge.class)
|
||||
public abstract class RenameMixInAbstractClass {
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.boot.jackson.scan.c;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.springframework.boot.jackson.JsonMixin;
|
||||
import org.springframework.boot.jackson.NameAndAge;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
@JsonMixin(type = NameAndAge.class)
|
||||
public interface RenameMixInInterface {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
package org.springframework.boot.jackson.scan.d;
|
||||
|
||||
import org.springframework.boot.jackson.JsonMixin;
|
||||
import org.springframework.boot.jackson.Name;
|
||||
import org.springframework.boot.jackson.NameAndAge;
|
||||
import org.springframework.boot.jackson.types.Name;
|
||||
import org.springframework.boot.jackson.types.NameAndAge;
|
||||
|
||||
@JsonMixin(type = { Name.class, NameAndAge.class })
|
||||
public class EmptyMixInClass {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.jackson;
|
||||
package org.springframework.boot.jackson.types;
|
||||
|
||||
/**
|
||||
* Sample object used for tests.
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.jackson;
|
||||
package org.springframework.boot.jackson.types;
|
||||
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.jackson;
|
||||
package org.springframework.boot.jackson.types;
|
||||
|
||||
/**
|
||||
* Sample object used for tests.
|
||||
Reference in New Issue
Block a user