Skip to content

Commit edc14c2

Browse files
committed
Merge branch '6.2.x'
# Conflicts: # spring-context-indexer/src/main/java/org/springframework/context/index/processor/StandardStereotypesProvider.java # spring-context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java # spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java
2 parents 7bc2a7f + c2a66e7 commit edc14c2

File tree

8 files changed

+52
-16
lines changed

8 files changed

+52
-16
lines changed

spring-aop/src/test/java/org/springframework/aop/interceptor/AsyncExecutionInterceptorTests.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
* Tests for {@link AsyncExecutionInterceptor}.
3838
*
3939
* @author Bao Ngo
40-
* @since 7.0
4140
*/
4241
class AsyncExecutionInterceptorTests {
4342

@@ -62,11 +61,13 @@ interface GenericRunner<O> {
6261
O run();
6362
}
6463

64+
6565
static class FutureRunner implements GenericRunner<Future<Void>> {
66+
6667
@Override
6768
public Future<Void> run() {
68-
return CompletableFuture.runAsync(() -> {
69-
});
69+
return CompletableFuture.runAsync(() -> {});
7070
}
7171
}
72+
7273
}

spring-context/src/main/java/org/springframework/context/annotation/AdviceMode.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@
1717
package org.springframework.context.annotation;
1818

1919
/**
20-
* Enumeration used to determine whether JDK proxy-based or
20+
* Enumeration used to determine whether JDK/CGLIB proxy-based or
2121
* AspectJ weaving-based advice should be applied.
2222
*
2323
* @author Chris Beams
2424
* @since 3.1
25-
* @see org.springframework.scheduling.annotation.EnableAsync#mode()
2625
* @see org.springframework.scheduling.annotation.AsyncConfigurationSelector#selectImports
27-
* @see org.springframework.transaction.annotation.EnableTransactionManagement#mode()
26+
* @see org.springframework.scheduling.annotation.EnableAsync#mode()
2827
*/
2928
public enum AdviceMode {
3029

3130
/**
32-
* JDK proxy-based advice.
31+
* JDK/CGLIB proxy-based advice.
3332
*/
3433
PROXY,
3534

spring-context/src/main/java/org/springframework/context/aot/AotApplicationContextInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ static <C extends ConfigurableApplicationContext> AotApplicationContextInitializ
6363

6464
private static <C extends ConfigurableApplicationContext> void initialize(
6565
C applicationContext, String... initializerClassNames) {
66+
6667
Log logger = LogFactory.getLog(AotApplicationContextInitializer.class);
6768
ClassLoader classLoader = applicationContext.getClassLoader();
6869
logger.debug("Initializing ApplicationContext with AOT");
6970
for (String initializerClassName : initializerClassNames) {
7071
logger.trace(LogMessage.format("Applying %s", initializerClassName));
71-
instantiateInitializer(initializerClassName, classLoader)
72-
.initialize(applicationContext);
72+
instantiateInitializer(initializerClassName, classLoader).initialize(applicationContext);
7373
}
7474
}
7575

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2002-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.jdbc.core.metadata;
18+
19+
import java.sql.DatabaseMetaData;
20+
import java.sql.SQLException;
21+
22+
/**
23+
* The MySQL/MariaDB specific implementation of {@link TableMetaDataProvider}.
24+
* Sets {@link #setGeneratedKeysColumnNameArraySupported} to {@code false}.
25+
*
26+
* @author Juergen Hoeller
27+
* @since 6.2.12
28+
*/
29+
public class MySQLTableMetaDataProvider extends GenericTableMetaDataProvider {
30+
31+
public MySQLTableMetaDataProvider(DatabaseMetaData databaseMetaData) throws SQLException {
32+
super(databaseMetaData);
33+
setGeneratedKeysColumnNameArraySupported(false);
34+
}
35+
36+
}

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataContext.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,7 @@ public boolean isGetGeneratedKeysSimulated() {
409409
}
410410

411411
/**
412-
* Does this database support a column name String array for retrieving generated
413-
* keys?
412+
* Does this database support a column name String array for retrieving generated keys?
414413
* @see java.sql.Connection#createStruct(String, Object[])
415414
*/
416415
public boolean isGeneratedKeysColumnNameArraySupported() {

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProvider.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,14 @@ void initializeWithTableColumnMetaData(DatabaseMetaData databaseMetaData, @Nulla
129129
@Nullable String getSimpleQueryForGetGeneratedKey(String tableName, String keyColumnName);
130130

131131
/**
132-
* Does this database support a column name String array for retrieving generated
133-
* keys?
132+
* Does this database support a column name String array for retrieving generated keys?
134133
* @see java.sql.Connection#createStruct(String, Object[])
135134
*/
136135
boolean isGeneratedKeysColumnNameArraySupported();
137136

138137
/**
139138
* Get the string used to quote SQL identifiers.
140-
* <p>This method returns a space ({@code " "}) if identifier quoting is not
141-
* supported.
139+
* <p>This method returns a space ({@code " "}) if identifier quoting is not supported.
142140
* @return database identifier quote string
143141
* @since 6.1
144142
* @see DatabaseMetaData#getIdentifierQuoteString()

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProviderFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ else if ("Apache Derby".equals(databaseProductName)) {
6666
else if ("HSQL Database Engine".equals(databaseProductName)) {
6767
provider = new HsqlTableMetaDataProvider(databaseMetaData);
6868
}
69+
else if ("MySQL".equals(databaseProductName) || "MariaDB".equals(databaseProductName)) {
70+
provider = new MySQLTableMetaDataProvider(databaseMetaData);
71+
}
6972
else {
7073
provider = new GenericTableMetaDataProvider(databaseMetaData);
7174
}

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityReturnValueHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* provide enough information to decide via {@link #supportsReturnType}.
4040
*
4141
* @author Rossen Stoyanchev
42-
* @since 7.0
42+
* @since 6.2.9
4343
*/
4444
public class ResponseEntityReturnValueHandler implements HandlerMethodReturnValueHandler {
4545

0 commit comments

Comments
 (0)