Skip to content

Commit f7c9180

Browse files
committed
update for Spring Boot 3.4
2 parents 2865fc4 + e7a7549 commit f7c9180

File tree

1,852 files changed

+17695
-18958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,852 files changed

+17695
-18958
lines changed

Diff for: 2.00-starting-project/pom.xml

+22-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.6.2</version>
9+
<version>3.4.0</version>
1010
<relativePath/>
1111
</parent>
1212

@@ -15,7 +15,8 @@
1515
<version>1.0.0</version>
1616

1717
<properties>
18-
<java.version>17</java.version>
18+
<java.version>23</java.version>
19+
<argLine></argLine>
1920
</properties>
2021

2122
<dependencies>
@@ -31,6 +32,25 @@
3132
<groupId>org.springframework.boot</groupId>
3233
<artifactId>spring-boot-maven-plugin</artifactId>
3334
</plugin>
35+
36+
<plugin>
37+
<groupId>org.apache.maven.plugins</groupId>
38+
<artifactId>maven-dependency-plugin</artifactId>
39+
<executions>
40+
<execution>
41+
<goals>
42+
<goal>properties</goal>
43+
</goals>
44+
</execution>
45+
</executions>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-surefire-plugin</artifactId>
50+
<configuration>
51+
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
52+
</configuration>
53+
</plugin>
3454
</plugins>
3555
</build>
3656

Diff for: 2.00-starting-project/src/test/java/.keep

Whitespace-only changes.

Diff for: 2.21-starting-project-solutions/pom.xml renamed to 2.01-starting-project-solutions/section-04-spring-boot-unit-testing-support/2.01-solution-junit-assertions/pom.xml

+23-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.6.2</version>
9+
<version>3.4.0</version>
1010
<relativePath/>
1111
</parent>
1212

@@ -15,7 +15,8 @@
1515
<version>1.0.0</version>
1616

1717
<properties>
18-
<java.version>17</java.version>
18+
<java.version>23</java.version>
19+
<argLine></argLine>
1920
</properties>
2021

2122
<dependencies>
@@ -37,7 +38,27 @@
3738
<groupId>org.springframework.boot</groupId>
3839
<artifactId>spring-boot-maven-plugin</artifactId>
3940
</plugin>
41+
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-dependency-plugin</artifactId>
45+
<executions>
46+
<execution>
47+
<goals>
48+
<goal>properties</goal>
49+
</goals>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<configuration>
57+
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
58+
</configuration>
59+
</plugin>
4060
</plugins>
61+
4162
</build>
4263

4364
</project>

Diff for: 2.20-starting-project/pom.xml

+22-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.6.2</version>
9+
<version>3.4.0</version>
1010
<relativePath/>
1111
</parent>
1212

@@ -15,7 +15,8 @@
1515
<version>1.0.0</version>
1616

1717
<properties>
18-
<java.version>17</java.version>
18+
<java.version>23</java.version>
19+
<argLine></argLine>
1920
</properties>
2021

2122
<dependencies>
@@ -37,6 +38,25 @@
3738
<groupId>org.springframework.boot</groupId>
3839
<artifactId>spring-boot-maven-plugin</artifactId>
3940
</plugin>
41+
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-dependency-plugin</artifactId>
45+
<executions>
46+
<execution>
47+
<goals>
48+
<goal>properties</goal>
49+
</goals>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<configuration>
57+
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
58+
</configuration>
59+
</plugin>
4060
</plugins>
4161
</build>
4262

Diff for: 2.01-starting-project-solutions/2.01-solution-junit-assertions/pom.xml renamed to 2.21-starting-project-solutions/section-05-unit-testing-mocking-with-mockito/pom.xml

+22-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.6.2</version>
9+
<version>3.4.0</version>
1010
<relativePath/>
1111
</parent>
1212

@@ -15,7 +15,8 @@
1515
<version>1.0.0</version>
1616

1717
<properties>
18-
<java.version>17</java.version>
18+
<java.version>23</java.version>
19+
<argLine></argLine>
1920
</properties>
2021

2122
<dependencies>
@@ -37,6 +38,25 @@
3738
<groupId>org.springframework.boot</groupId>
3839
<artifactId>spring-boot-maven-plugin</artifactId>
3940
</plugin>
41+
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-dependency-plugin</artifactId>
45+
<executions>
46+
<execution>
47+
<goals>
48+
<goal>properties</goal>
49+
</goals>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
<plugin>
54+
<groupId>org.apache.maven.plugins</groupId>
55+
<artifactId>maven-surefire-plugin</artifactId>
56+
<configuration>
57+
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
58+
</configuration>
59+
</plugin>
4060
</plugins>
4161
</build>
4262

Diff for: 2.21-starting-project-solutions/src/test/java/com/luv2code/test/MockAnnotationTest.java renamed to 2.21-starting-project-solutions/section-05-unit-testing-mocking-with-mockito/src/test/java/com/luv2code/test/MockAnnotationTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import org.mockito.Mock;
1313
import org.springframework.beans.factory.annotation.Autowired;
1414
import org.springframework.boot.test.context.SpringBootTest;
15-
import org.springframework.boot.test.mock.mockito.MockBean;
1615
import org.springframework.context.ApplicationContext;
16+
import org.springframework.test.context.bean.override.mockito.MockitoBean;
1717

1818
import static org.junit.jupiter.api.Assertions.*;
1919
import static org.mockito.Mockito.*;
@@ -31,7 +31,7 @@ public class MockAnnotationTest {
3131
StudentGrades studentGrades;
3232

3333
// @Mock
34-
@MockBean
34+
@MockitoBean
3535
private ApplicationDao applicationDao;
3636

3737
// @InjectMocks

Diff for: 3.00-starting-project/pom.xml

+24-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.springframework.boot</groupId>
88
<artifactId>spring-boot-starter-parent</artifactId>
9-
<version>2.6.2</version>
9+
<version>3.4.0</version>
1010
<relativePath/>
1111
</parent>
1212

@@ -16,7 +16,8 @@
1616
<packaging>war</packaging>
1717

1818
<properties>
19-
<java.version>17</java.version>
19+
<java.version>23</java.version>
20+
<argLine></argLine>
2021
</properties>
2122

2223
<dependencies>
@@ -41,8 +42,8 @@
4142

4243
<!-- mysql java connector -->
4344
<dependency>
44-
<groupId>mysql</groupId>
45-
<artifactId>mysql-connector-java</artifactId>
45+
<groupId>com.mysql</groupId>
46+
<artifactId>mysql-connector-j</artifactId>
4647
<scope>runtime</scope>
4748
</dependency>
4849

@@ -66,6 +67,25 @@
6667
<groupId>org.springframework.boot</groupId>
6768
<artifactId>spring-boot-maven-plugin</artifactId>
6869
</plugin>
70+
71+
<plugin>
72+
<groupId>org.apache.maven.plugins</groupId>
73+
<artifactId>maven-dependency-plugin</artifactId>
74+
<executions>
75+
<execution>
76+
<goals>
77+
<goal>properties</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
<plugin>
83+
<groupId>org.apache.maven.plugins</groupId>
84+
<artifactId>maven-surefire-plugin</artifactId>
85+
<configuration>
86+
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
87+
</configuration>
88+
</plugin>
6989
</plugins>
7090
</build>
7191

Diff for: 3.00-starting-project/src/main/java/com/luv2code/springmvc/models/CollegeStudent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.luv2code.springmvc.models;
22

3-
import javax.persistence.*;
3+
import jakarta.persistence.*;
44

55
@Entity
66
@Table(name = "student")

Diff for: 3.00-starting-project/src/main/java/com/luv2code/springmvc/models/HistoryGrade.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.luv2code.springmvc.models;
22

3-
import javax.persistence.*;
3+
import jakarta.persistence.*;
44

55
@Entity
66
@Table(name = "history_grade")

Diff for: 3.00-starting-project/src/main/java/com/luv2code/springmvc/models/MathGrade.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.luv2code.springmvc.models;
22

3-
import javax.persistence.*;
3+
import jakarta.persistence.*;
44

55
@Entity
66
@Table(name = "math_grade")

Diff for: 3.00-starting-project/src/main/java/com/luv2code/springmvc/models/ScienceGrade.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.luv2code.springmvc.models;
22

3-
import javax.persistence.*;
3+
import jakarta.persistence.*;
44

55
@Entity
66
@Table(name = "science_grade")

Diff for: 3.01-starting-project-solutions/3.01-05-solution-sql-annotation-get-gradebook-test/pom.xml

-72
This file was deleted.

0 commit comments

Comments
 (0)