Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Spring Boot to v3.4.0 #27963

Merged
merged 38 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b46bec1
update spring-boot-dependencies bom to v3.4.0
mshima Nov 21, 2024
01f5217
liquibase: update LiquibaseConfig for v3.4.0
mshima Nov 21, 2024
f984edf
spring-boot: disable testFilterDoesNotForwardToIndexForApi test
mshima Nov 21, 2024
d3f9b85
spring-boot: disable testFilterDoesNotForwardToIndexForApi test
mshima Nov 21, 2024
d3558b6
liquibase: fix LiquibaseConfiguration
mshima Nov 21, 2024
3f36bc7
liquibase: update LiquibaseConfig for v3.4.0
mshima Nov 21, 2024
bdfab33
spring-boot: fix disabled test
mshima Nov 21, 2024
976b730
spring-boot: fix disabled test
mshima Nov 21, 2024
8fcc0c7
liquibase: adjusts
mshima Nov 21, 2024
1ade660
cypress: skip api test
mshima Nov 21, 2024
e142aa3
bump springdoc version
mshima Nov 22, 2024
c1e7acc
cypress: reenable doc test
mshima Nov 22, 2024
f513589
Update generator-constants.js
mshima Nov 22, 2024
f41a993
spring-boot: enable springdoc test
mshima Nov 22, 2024
d9a6582
Disable compatibility-verifier
mshima Nov 22, 2024
94c19df
spring-data-relational: drop removed method usage.
mshima Nov 23, 2024
19f3a95
bump spring-cloud-dependencies
mshima Nov 23, 2024
e30301d
Update springdoc to 2.7.0
DanielFran Nov 23, 2024
0ecc318
spring-boot: workaround spring-boot issue
mshima Nov 24, 2024
46cc112
spring-boot: workaround issue
mshima Nov 24, 2024
c7dc896
liquibase: update native hints
mshima Nov 24, 2024
c6e71a8
spring-boot: fix
mshima Nov 24, 2024
f642044
liquibase: add native hint
mshima Nov 24, 2024
836c261
spring-boot: try to fix value detection
mshima Nov 24, 2024
e74f59a
spring-boot: try to fix native support
mshima Nov 24, 2024
d267314
spring-boot: revert autowired
mshima Nov 24, 2024
94a82c1
spring-boot: drop compatibility-verifier
mshima Nov 24, 2024
0fbd676
Merge remote-tracking branch 'upstream/main' into spring-boot/v3.4.0
mshima Nov 25, 2024
097deb9
spring-boot: disable required from relationship
mshima Nov 25, 2024
56d194e
Merge branch 'main' into spring-boot/v3.4.0
mshima Nov 27, 2024
54a3c4e
Update KafkaTestContainersSpringContextCustomizerFactory.java.ejs
mshima Nov 29, 2024
abb17dc
switch spring-cloud to final
mshima Dec 3, 2024
3c10255
revert snapshot repository
mshima Dec 3, 2024
aa2ef95
revert test change, issue has been fixed in final
mshima Dec 3, 2024
dff25f9
Update generators/spring-cloud-stream/generators/kafka/templates/src/…
mshima Dec 3, 2024
9d2c16e
spring-boot: migrate mock/spy.
mshima Dec 3, 2024
e1043fe
adjusts
mshima Dec 3, 2024
6bf57bf
Merge remote-tracking branch 'upstream/main' into spring-boot/v3.4.0
mshima Dec 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generators/generator-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const JAVA_VERSION = '17';
// Supported Java versions, https://www.oracle.com/java/technologies/java-se-support-roadmap.html
export const JAVA_COMPATIBLE_VERSIONS = ['17', '21', '23'];
// Force spring milestone repository. Spring Boot milestones are detected.
export const ADD_SPRING_MILESTONE_REPOSITORY = false;
export const ADD_SPRING_MILESTONE_REPOSITORY = true;
mshima marked this conversation as resolved.
Show resolved Hide resolved

// Version of Node, NPM
export const NODE_VERSION = readFileSync(join(fileURLToPath(import.meta.url), '../init/resources/.node-version'), 'utf-8').trim();
Expand Down
2 changes: 2 additions & 0 deletions generators/liquibase/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ export default class LiquibaseGenerator extends BaseEntityChangesGenerator {
declaredConstructors: [
'liquibase.database.LiquibaseTableNamesFactory.class',
'liquibase.report.ShowSummaryGeneratorFactory.class',
'liquibase.changelog.FastCheckService.class',
'liquibase.changelog.visitor.ValidatingVisitorGeneratorFactory.class',
],
publicConstructors: ['liquibase.ui.LoggerUIService.class'],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

@Configuration
public class LiquibaseConfiguration {
Expand Down Expand Up @@ -89,14 +91,18 @@ public class LiquibaseConfiguration {
}
<%_ } _%>
liquibase.setChangeLog("classpath:config/liquibase/master.xml");
liquibase.setContexts(liquibaseProperties.getContexts());
if (!CollectionUtils.isEmpty(liquibaseProperties.getContexts())) {
liquibase.setContexts(StringUtils.collectionToCommaDelimitedString(liquibaseProperties.getContexts()));
}
liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema());
liquibase.setLiquibaseSchema(liquibaseProperties.getLiquibaseSchema());
liquibase.setLiquibaseTablespace(liquibaseProperties.getLiquibaseTablespace());
liquibase.setDatabaseChangeLogLockTable(liquibaseProperties.getDatabaseChangeLogLockTable());
liquibase.setDatabaseChangeLogTable(liquibaseProperties.getDatabaseChangeLogTable());
liquibase.setDropFirst(liquibaseProperties.isDropFirst());
liquibase.setLabelFilter(liquibaseProperties.getLabelFilter());
if (!CollectionUtils.isEmpty(liquibaseProperties.getLabelFilter())) {
liquibase.setLabelFilter(StringUtils.collectionToCommaDelimitedString(liquibaseProperties.getLabelFilter()));
}
liquibase.setChangeLogParameters(liquibaseProperties.getParameters());
liquibase.setRollbackFile(liquibaseProperties.getRollbackFile());
liquibase.setTestRollbackOnUpdate(liquibaseProperties.isTestRollbackOnUpdate());
Expand Down
2 changes: 1 addition & 1 deletion generators/server/resources/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[libraries]
spring-cloud-dependencies = { module = 'org.springframework.cloud:spring-cloud-dependencies', version = '2023.0.4' }
spring-cloud-dependencies = { module = 'org.springframework.cloud:spring-cloud-dependencies', version = '2024.0.0' }

springdoc = { module = 'org.springdoc:springdoc-openapi-starter-webmvc-api', version = '2.7.0' }

Expand Down
10 changes: 10 additions & 0 deletions generators/spring-boot/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,16 @@ public void set${javaBeanCase(propertyName)}(${propertyType} ${propertyName}) {
source.addMavenDependency!({ inProfile: 'docker-compose', ...dockerComposeArtifact, optional: true });
}
},
nativeSupport({ application, source }) {
const { graalvmSupport, reactive } = application;
if (graalvmSupport && !reactive) {
// Workaround https://github.com/spring-projects/spring-boot/issues/43260
source.addJavaDependencies?.([
{ groupId: 'io.reactivex.rxjava3', artifactId: 'rxjava', scope: 'runtime' },
{ groupId: 'io.projectreactor', artifactId: 'reactor-core', scope: 'runtime' },
]);
}
},
});
}

Expand Down
398 changes: 166 additions & 232 deletions generators/spring-boot/resources/spring-boot-dependencies.pom

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import static tech.jhipster.config.logging.LoggingUtils.*;
/*
* Configures the console and Logstash log appenders from the app properties
*/
@Configuration
@Configuration(proxyBeanMethods = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<%_ if (serviceDiscoveryAny) { _%>
@RefreshScope
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class KafkaTestContainersSpringContextCustomizerFactory implements Contex
kafkaBean = beanFactory.createBean(KafkaTestContainer.class);
beanFactory.registerSingleton(KafkaTestContainer.class.getName(), kafkaBean);
}
testValues = testValues.and("spring.cloud.stream.kafka.binder.brokers=" + kafkaBean.getKafkaContainer().getHost() + ':' + kafkaBean.getKafkaContainer().getMappedPort(KafkaContainer.KAFKA_PORT));
testValues = testValues.and("spring.cloud.stream.kafka.binder.brokers=127.0.0.1:" + kafkaBean.getKafkaContainer().getMappedPort(KafkaContainer.KAFKA_PORT));
mshima marked this conversation as resolved.
Show resolved Hide resolved
}
testValues.applyTo(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ public class EntityManager {
if (sortParameter != null && sortParameter.isSorted()) {
RelationalPersistentEntity<?> entity = getPersistentEntity(entityType);
if (entity != null) {
Sort sort = updateMapper.getMappedObject(sortParameter, entity);
selectFrom = selectFrom.orderBy(
createOrderByFields(Table.create(entity.getTableName()).as(EntityManager.ENTITY_ALIAS), sort)
createOrderByFields(Table.create(entity.getTableName()).as(EntityManager.ENTITY_ALIAS), sortParameter)
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"otherEntityRelationshipName": "requiredManyToOneOtherSide",
"relationshipName": "requiredManyToOne",
"relationshipType": "many-to-one",
"relationshipValidateRules": "required"
"relationshipValidateRules https://github.com/spring-projects/spring-data-jpa/issues/3690": "required"
},
{
"otherEntityField": "id",
Expand Down
Loading