Skip to content

Commit d7e1a3b

Browse files
author
jeka-bot
committed
Update dependencies and align with new Spring Boot and GraalVM versions
- Bump default Spring Boot version to `4.0.1`, replace `spring-boot-starter-web` with `spring-boot-starter-webmvc`. - Replace deprecated `AutoConfigureMockMvc` import paths in tests. - Update GraalVM and repo default versions to `25` and `0.11.3`, respectively. - Refactor code to use `List.of` for cleaner dependencies formatting.
1 parent dedbe0c commit d7e1a3b

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

core/src/main/java/dev/jeka/core/api/tooling/nativ/JkNativeCompilation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@
102102
*/
103103
public class JkNativeCompilation {
104104

105-
public static final String DEFAULT_GRAALVM_VERSION = "23";;
105+
public static final String DEFAULT_GRAALVM_VERSION = "25";;
106106

107-
public static final String DEFAULT_REPO_VERSION = "0.10.3";
107+
public static final String DEFAULT_REPO_VERSION = "0.11.3";
108108

109109
private static final String JEKA_GRAAALVM_HOME = "JEKA_GRAAALVM_HOME";
110110

plugins/plugins.springboot/res/snippet/BaseControllerIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import app.App;
44
import org.junit.jupiter.api.Test;
55
import org.springframework.beans.factory.annotation.Autowired;
6-
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
6+
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
77
import org.springframework.boot.test.context.SpringBootTest;
88
import org.springframework.test.context.ContextConfiguration;
99
import org.springframework.test.web.servlet.MockMvc;
@@ -15,8 +15,8 @@
1515
@ContextConfiguration(classes = App.class)
1616
class ControllerIT {
1717

18-
@Autowired
19-
private MockMvc mvc;
18+
@Autowired
19+
private MockMvc mvc;
2020

2121
@Test
2222
void helloWorld() throws Exception {

plugins/plugins.springboot/res/snippet/ControllerIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.jupiter.api.Test;
44
import org.springframework.beans.factory.annotation.Autowired;
5-
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
5+
import org.springframework.boot.webmvc.test.autoconfigure.AutoConfigureMockMvc;
66
import org.springframework.boot.test.context.SpringBootTest;
77
import org.springframework.test.web.servlet.MockMvc;
88
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
@@ -12,8 +12,8 @@
1212
@AutoConfigureMockMvc
1313
class ControllerIT {
1414

15-
@Autowired
16-
private MockMvc mvc;
15+
@Autowired
16+
private MockMvc mvc;
1717

1818
@Test
1919
void helloWorld() throws Exception {

plugins/plugins.springboot/src/dev/jeka/plugins/springboot/SpringbootScaffold.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818

1919
import dev.jeka.core.api.depmanagement.JkDepSuggest;
2020
import dev.jeka.core.api.project.scaffold.JkProjectScaffold;
21-
import dev.jeka.core.api.scaffold.JkScaffold;
2221
import dev.jeka.core.api.utils.JkUtilsIO;
23-
import dev.jeka.core.api.utils.JkUtilsIterable;
2422
import dev.jeka.core.tool.JkConstants;
2523
import dev.jeka.core.tool.builtins.base.JkBaseScaffold;
2624

@@ -30,7 +28,7 @@
3028
class SpringbootScaffold {
3129

3230
@JkDepSuggest(versionOnly = true, hint = "org.springframework.boot:spring-boot-dependencies:")
33-
private static final String DEFAULT_SPRINGBOOT_VERSION = "3.5.0";
31+
private static final String DEFAULT_SPRINGBOOT_VERSION = "4.0.1";
3432

3533
public static void customize(JkProjectScaffold projectScaffold) {
3634

@@ -57,8 +55,8 @@ public static void customize(JkProjectScaffold projectScaffold) {
5755
}
5856

5957
// Add dependencies
60-
projectScaffold.compileDeps.add("org.springframework.boot:spring-boot-starter-web");
61-
projectScaffold.testDeps.add("org.springframework.boot:spring-boot-starter-test");
58+
projectScaffold.compileDeps.add("org.springframework.boot:spring-boot-starter-webmvc");
59+
projectScaffold.testDeps.add("org.springframework.boot:spring-boot-starter-webmvc-test");
6260
projectScaffold.versionDeps.add(JkSpringbootProject.BOM_COORDINATE + lastSpringbootVersion + "@pom");
6361

6462
// Add sample code
@@ -88,12 +86,12 @@ static void customize(JkBaseScaffold baseScaffold) {
8886
JkSpringModules.Boot.STARTER_PARENT.toColonNotation(),
8987
DEFAULT_SPRINGBOOT_VERSION);
9088

91-
List<String> deps = JkUtilsIterable.listOf(
89+
List<String> deps = List.of(
9290
JkSpringbootProject.BOM_COORDINATE + lastSpringbootVersion + "@pom",
93-
"org.springframework.boot:spring-boot-starter-web");
91+
"org.springframework.boot:spring-boot-starter-webmvc");
9492

95-
List<String> devDeps = JkUtilsIterable.listOf(
96-
"org.springframework.boot:spring-boot-starter-test");
93+
List<String> devDeps = List.of(
94+
"org.springframework.boot:spring-boot-starter-webmvc-test");
9795

9896
// Build class code
9997
String buildClassCode = readSnippet("BaseBuild.java");

0 commit comments

Comments
 (0)