Skip to content

Commit

Permalink
Upgrade to Spring Boot 3.3.0
Browse files Browse the repository at this point in the history
Closes gh-1535
  • Loading branch information
mhalbritter committed Jun 7, 2024
1 parent f9d74af commit adde507
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
Expand All @@ -26,6 +26,7 @@
import io.spring.initializr.metadata.Dependency;
import io.spring.initializr.metadata.InitializrMetadata;
import io.spring.initializr.metadata.support.MetadataBuildItemResolver;
import org.assertj.core.api.InstanceOfAssertFactories;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -47,7 +48,7 @@ void customizeWhenJpaFacetPresentShouldAddKotlinJpaPlugin() {
assertThat(plugin.getGroupId()).isEqualTo("org.jetbrains.kotlin");
assertThat(plugin.getArtifactId()).isEqualTo("kotlin-maven-plugin");
MavenPlugin.Setting settings = plugin.getConfiguration().getSettings().get(0);
assertThat(settings.getValue()).asList()
assertThat(settings.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(0)
.hasFieldOrPropertyWithValue("name", "plugin")
.hasFieldOrPropertyWithValue("value", "jpa");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
Expand All @@ -25,6 +25,7 @@
import io.spring.initializr.generator.buildsystem.maven.MavenPlugin.Dependency;
import io.spring.initializr.generator.buildsystem.maven.MavenPlugin.Setting;
import io.spring.initializr.generator.version.VersionProperty;
import org.assertj.core.api.InstanceOfAssertFactories;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -66,15 +67,15 @@ void kotlinMavenPluginIsConfigured() {
assertThat(configuration.getSettings()).hasSize(2);
Setting args = configuration.getSettings().get(0);
assertThat(args.getName()).isEqualTo("args");
assertThat(args.getValue()).asList().hasSize(1);
assertThat(args.getValue()).asList()
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST).hasSize(1);
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(0)
.hasFieldOrPropertyWithValue("name", "arg")
.hasFieldOrPropertyWithValue("value", "-Xjsr305=strict");
Setting compilerPlugins = configuration.getSettings().get(1);
assertThat(compilerPlugins.getName()).isEqualTo("compilerPlugins");
assertThat(compilerPlugins.getValue()).asList().hasSize(1);
assertThat(compilerPlugins.getValue()).asList()
assertThat(compilerPlugins.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST).hasSize(1);
assertThat(compilerPlugins.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(0)
.hasFieldOrPropertyWithValue("name", "plugin")
.hasFieldOrPropertyWithValue("value", "spring");
Expand All @@ -95,12 +96,12 @@ void kotlinMavenPluginWithSeveralArgs() {
Configuration configuration = kotlinPlugin.getConfiguration();
Setting args = configuration.getSettings().get(0);
assertThat(args.getName()).isEqualTo("args");
assertThat(args.getValue()).asList().hasSize(2);
assertThat(args.getValue()).asList()
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST).hasSize(2);
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(0)
.hasFieldOrPropertyWithValue("name", "arg")
.hasFieldOrPropertyWithValue("value", "-Done=1");
assertThat(args.getValue()).asList()
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(1)
.hasFieldOrPropertyWithValue("name", "arg")
.hasFieldOrPropertyWithValue("value", "-Dtwo=2");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 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.
Expand All @@ -22,6 +22,7 @@
import io.spring.initializr.generator.buildsystem.maven.MavenPlugin.Execution;
import io.spring.initializr.generator.buildsystem.maven.MavenPlugin.Setting;
import io.spring.initializr.generator.version.VersionProperty;
import org.assertj.core.api.InstanceOfAssertFactories;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -63,15 +64,15 @@ void kotlinMavenPluginIsConfigured() {
assertThat(configuration.getSettings()).hasSize(3);
Setting args = configuration.getSettings().get(0);
assertThat(args.getName()).isEqualTo("args");
assertThat(args.getValue()).asList().hasSize(1);
assertThat(args.getValue()).asList()
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST).hasSize(1);
assertThat(args.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(0)
.hasFieldOrPropertyWithValue("name", "arg")
.hasFieldOrPropertyWithValue("value", "-Xjsr305=strict");
Setting compilerPlugins = configuration.getSettings().get(1);
assertThat(compilerPlugins.getName()).isEqualTo("compilerPlugins");
assertThat(compilerPlugins.getValue()).asList().hasSize(1);
assertThat(compilerPlugins.getValue()).asList()
assertThat(compilerPlugins.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST).hasSize(1);
assertThat(compilerPlugins.getValue()).asInstanceOf(InstanceOfAssertFactories.LIST)
.element(0)
.hasFieldOrPropertyWithValue("name", "plugin")
.hasFieldOrPropertyWithValue("value", "spring");
Expand Down
2 changes: 1 addition & 1 deletion initializr-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<commons-text.version>1.12.0</commons-text.version>
<maven.version>3.9.6</maven.version>
<maven-resolver.version>1.9.20</maven-resolver.version>
<spring-boot.version>3.2.5</spring-boot.version>
<spring-boot.version>3.3.0</spring-boot.version>
<spring-cloud-contract.version>4.1.2</spring-cloud-contract.version>
</properties>
<scm>
Expand Down

0 comments on commit adde507

Please sign in to comment.