Skip to content

Commit 7e4800f

Browse files
Ramesh FadatareRamesh Fadatare
Ramesh Fadatare
authored and
Ramesh Fadatare
committed
Upgraded to Spring Boot 3 and Java 17
1 parent 13c452f commit 7e4800f

File tree

34 files changed

+22
-239
lines changed

34 files changed

+22
-239
lines changed

springboot2-mssql-jpa-hibernate-crud-example/pom.xml renamed to springboot-mssql-jpa-hibernate-crud-example/pom.xml

+12-7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
<parent>
1616
<groupId>org.springframework.boot</groupId>
1717
<artifactId>spring-boot-starter-parent</artifactId>
18-
<version>2.0.5.RELEASE</version>
18+
<version>3.0.4</version>
1919
<relativePath /> <!-- lookup parent from reposictory -->
2020
</parent>
2121

2222
<properties>
2323
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2424
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
25-
<java.version>1.8</java.version>
25+
<java.version>17</java.version>
2626
</properties>
2727

2828
<dependencies>
@@ -35,11 +35,16 @@
3535
<artifactId>spring-boot-starter-web</artifactId>
3636
</dependency>
3737

38-
<dependency>
39-
<groupId>com.microsoft.sqlserver</groupId>
40-
<artifactId>sqljdbc4</artifactId>
41-
<version>4.0</version>
42-
</dependency>
38+
<dependency>
39+
<groupId>org.springframework.boot</groupId>
40+
<artifactId>spring-boot-starter-validation</artifactId>
41+
</dependency>
42+
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
43+
<dependency>
44+
<groupId>com.microsoft.sqlserver</groupId>
45+
<artifactId>mssql-jdbc</artifactId>
46+
<version>12.2.0.jre11</version>
47+
</dependency>
4348

4449
<dependency>
4550
<groupId>org.springframework.boot</groupId>
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.List;
55
import java.util.Map;
66

7-
import javax.validation.Valid;
7+
import jakarta.validation.Valid;
88

99
import org.springframework.beans.factory.annotation.Autowired;
1010
import org.springframework.http.ResponseEntity;
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
package net.guides.springboot2.crud.model;
22

3-
import javax.persistence.Column;
4-
import javax.persistence.Entity;
5-
import javax.persistence.GeneratedValue;
6-
import javax.persistence.GenerationType;
7-
import javax.persistence.Id;
8-
import javax.persistence.Table;
3+
import jakarta.persistence.*;
94

105
@Entity
116
@Table(name = "employees")
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import net.guides.springboot2.crud.model.Employee;
77

8-
@Repository
98
public interface EmployeeRepository extends JpaRepository<Employee, Long>{
109

1110
}

springboot2-postgresql-jpa-hibernate-crud-example/pom.xml renamed to springboot-postgresql-jpa-hibernate-crud-example/pom.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
<parent>
1616
<groupId>org.springframework.boot</groupId>
1717
<artifactId>spring-boot-starter-parent</artifactId>
18-
<version>2.0.5.RELEASE</version>
18+
<version>3.0.4</version>
1919
<relativePath /> <!-- lookup parent from reposictory -->
2020
</parent>
2121

2222
<properties>
2323
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2424
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
25-
<java.version>1.8</java.version>
25+
<java.version>17</java.version>
2626
</properties>
2727

2828
<dependencies>
@@ -34,7 +34,10 @@
3434
<groupId>org.springframework.boot</groupId>
3535
<artifactId>spring-boot-starter-web</artifactId>
3636
</dependency>
37-
37+
<dependency>
38+
<groupId>org.springframework.boot</groupId>
39+
<artifactId>spring-boot-starter-validation</artifactId>
40+
</dependency>
3841
<dependency>
3942
<groupId>org.postgresql</groupId>
4043
<artifactId>postgresql</artifactId>
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import java.util.List;
55
import java.util.Map;
66

7-
import javax.validation.Valid;
7+
import jakarta.validation.Valid;
88

99
import org.springframework.beans.factory.annotation.Autowired;
1010
import org.springframework.http.ResponseEntity;
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
package net.guides.springboot2.crud.model;
22

3-
import javax.persistence.Column;
4-
import javax.persistence.Entity;
5-
import javax.persistence.GeneratedValue;
6-
import javax.persistence.GenerationType;
7-
import javax.persistence.Id;
8-
import javax.persistence.Table;
3+
import jakarta.persistence.*;
94

105
@Entity
116
@Table(name = "employees")

springboot-testing-examples/src/test/java/net/guides/springboot2/springboottestingexamples/SpringbootTestingExamplesApplicationTests.java

-16
This file was deleted.

springboot-upload-download-file-database/src/test/java/net/javaguides/springboot/fileuploaddownload/SpringbootUploadDownloadFileApplicationTests.java

-16
This file was deleted.

springboot2-junit5-example/pom.xml

-68
Original file line numberDiff line numberDiff line change
@@ -1,68 +0,0 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5-
<modelVersion>4.0.0</modelVersion>
6-
7-
<groupId>net.guides.springboot2</groupId>
8-
<artifactId>springboot2-junit5-example</artifactId>
9-
<version>0.0.1-SNAPSHOT</version>
10-
<packaging>jar</packaging>
11-
12-
<name>springboot2-junit5-example</name>
13-
<description>Demo project for Spring Boot</description>
14-
15-
<parent>
16-
<groupId>org.springframework.boot</groupId>
17-
<artifactId>spring-boot-starter-parent</artifactId>
18-
<version>2.0.5.RELEASE</version>
19-
<relativePath /> <!-- lookup parent from repository -->
20-
</parent>
21-
22-
<properties>
23-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
24-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
25-
<java.version>1.8</java.version>
26-
</properties>
27-
28-
<dependencies>
29-
<dependency>
30-
<groupId>org.springframework.boot</groupId>
31-
<artifactId>spring-boot-starter-web</artifactId>
32-
</dependency>
33-
<dependency>
34-
<groupId>org.springframework.boot</groupId>
35-
<artifactId>spring-boot-starter-test</artifactId>
36-
<scope>test</scope>
37-
<exclusions>
38-
<exclusion>
39-
<groupId>junit</groupId>
40-
<artifactId>junit</artifactId>
41-
</exclusion>
42-
</exclusions>
43-
</dependency>
44-
<dependency>
45-
<groupId>org.junit.jupiter</groupId>
46-
<artifactId>junit-jupiter-api</artifactId>
47-
<scope>test</scope>
48-
</dependency>
49-
<dependency>
50-
<groupId>org.junit.jupiter</groupId>
51-
<artifactId>junit-jupiter-engine</artifactId>
52-
<scope>test</scope>
53-
</dependency>
54-
</dependencies>
55-
<build>
56-
<plugins>
57-
<plugin>
58-
<groupId>org.springframework.boot</groupId>
59-
<artifactId>spring-boot-maven-plugin</artifactId>
60-
</plugin>
61-
<plugin>
62-
<groupId>org.apache.maven.plugins</groupId>
63-
<artifactId>maven-surefire-plugin</artifactId>
64-
</plugin>
65-
</plugins>
66-
</build>
67-
68-
</project>

springboot2-postgresql-jpa-hibernate-crud-example/src/test/java/net/guides/springboot2/springboot2jpacrudexample/ApplicationTests.java

-16
This file was deleted.

springboot2-postgresql-jpa-hibernate-crud-example/src/test/java/net/guides/springboot2/springboot2jpacrudexample/EmployeeControllerIntegrationTest.java

-98
This file was deleted.

0 commit comments

Comments
 (0)