Skip to content

Commit 291deea

Browse files
Ramesh FadatareRamesh Fadatare
Ramesh Fadatare
authored and
Ramesh Fadatare
committed
Upgraded to Spring boot 3
1 parent 7c69b26 commit 291deea

File tree

78 files changed

+1210
-1120
lines changed

Some content is hidden

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

78 files changed

+1210
-1120
lines changed

Diff for: pom.xml

+20-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.4.2</version>
8+
<version>3.0.0</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.springboot.blog</groupId>
@@ -14,7 +14,7 @@
1414
<name>springboot-blog-rest-api</name>
1515
<description>Spring boot blog application rest api&apos;s</description>
1616
<properties>
17-
<java.version>1.8</java.version>
17+
<java.version>17</java.version>
1818
</properties>
1919
<dependencies>
2020
<dependency>
@@ -53,29 +53,35 @@
5353
<groupId>org.springframework.boot</groupId>
5454
<artifactId>spring-boot-starter-validation</artifactId>
5555
</dependency>
56+
<dependency>
57+
<groupId>org.springframework.boot</groupId>
58+
<artifactId>spring-boot-starter-test</artifactId>
59+
<scope>test</scope>
60+
</dependency>
5661
<dependency>
5762
<groupId>org.springframework.boot</groupId>
5863
<artifactId>spring-boot-starter-security</artifactId>
5964
</dependency>
60-
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt -->
65+
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-impl -->
6166
<dependency>
6267
<groupId>io.jsonwebtoken</groupId>
63-
<artifactId>jjwt</artifactId>
64-
<version>0.9.1</version>
68+
<artifactId>jjwt-impl</artifactId>
69+
<version>0.11.5</version>
70+
<scope>runtime</scope>
6571
</dependency>
72+
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-api -->
6673
<dependency>
67-
<groupId>org.springframework.boot</groupId>
68-
<artifactId>spring-boot-starter-test</artifactId>
69-
<scope>test</scope>
74+
<groupId>io.jsonwebtoken</groupId>
75+
<artifactId>jjwt-api</artifactId>
76+
<version>0.11.5</version>
7077
</dependency>
71-
72-
<!-- https://mvnrepository.com/artifact/io.springfox/springfox-boot-starter -->
78+
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt-jackson -->
7379
<dependency>
74-
<groupId>io.springfox</groupId>
75-
<artifactId>springfox-boot-starter</artifactId>
76-
<version>3.0.0</version>
80+
<groupId>io.jsonwebtoken</groupId>
81+
<artifactId>jjwt-jackson</artifactId>
82+
<version>0.11.5</version>
83+
<scope>runtime</scope>
7784
</dependency>
78-
7985
</dependencies>
8086

8187
<build>

Diff for: springboot-blog-rest-api.iml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17">
4+
<output url="file://$MODULE_DIR$/target/classes" />
5+
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6+
<content url="file://$MODULE_DIR$">
7+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9+
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10+
<excludeFolder url="file://$MODULE_DIR$/target" />
11+
</content>
12+
<orderEntry type="inheritedJdk" />
13+
<orderEntry type="sourceFolder" forTests="false" />
14+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-jpa:3.0.0" level="project" />
15+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:3.0.0" level="project" />
16+
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.9.1" level="project" />
17+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:3.0.0" level="project" />
18+
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:5.0.1" level="project" />
19+
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:6.0.2" level="project" />
20+
<orderEntry type="library" name="Maven: org.hibernate.orm:hibernate-core:6.1.5.Final" level="project" />
21+
<orderEntry type="library" name="Maven: jakarta.persistence:jakarta.persistence-api:3.1.0" level="project" />
22+
<orderEntry type="library" name="Maven: jakarta.transaction:jakarta.transaction-api:2.0.1" level="project" />
23+
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.5.0.Final" level="project" />
24+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.hibernate.common:hibernate-commons-annotations:6.0.2.Final" level="project" />
25+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jboss:jandex:2.4.2.Final" level="project" />
26+
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
27+
<orderEntry type="library" scope="RUNTIME" name="Maven: net.bytebuddy:byte-buddy:1.12.19" level="project" />
28+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.glassfish.jaxb:jaxb-runtime:4.0.1" level="project" />
29+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.glassfish.jaxb:jaxb-core:4.0.1" level="project" />
30+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.eclipse.angus:angus-activation:1.0.0" level="project" />
31+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.glassfish.jaxb:txw2:4.0.1" level="project" />
32+
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.istack:istack-commons-runtime:4.1.1" level="project" />
33+
<orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.inject:jakarta.inject-api:2.0.0" level="project" />
34+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr4-runtime:4.10.1" level="project" />
35+
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-jpa:3.0.0" level="project" />
36+
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:3.0.0" level="project" />
37+
<orderEntry type="library" name="Maven: org.springframework:spring-orm:6.0.2" level="project" />
38+
<orderEntry type="library" name="Maven: org.springframework:spring-context:6.0.2" level="project" />
39+
<orderEntry type="library" name="Maven: org.springframework:spring-tx:6.0.2" level="project" />
40+
<orderEntry type="library" name="Maven: org.springframework:spring-beans:6.0.2" level="project" />
41+
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:2.1.1" level="project" />
42+
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:2.0.4" level="project" />
43+
<orderEntry type="library" name="Maven: org.springframework:spring-aspects:6.0.2" level="project" />
44+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:3.0.0" level="project" />
45+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:3.0.0" level="project" />
46+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:3.0.0" level="project" />
47+
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.4.5" level="project" />
48+
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.4.5" level="project" />
49+
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.19.0" level="project" />
50+
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.19.0" level="project" />
51+
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:2.0.4" level="project" />
52+
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.33" level="project" />
53+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:3.0.0" level="project" />
54+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.1" level="project" />
55+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.1" level="project" />
56+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.1" level="project" />
57+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:3.0.0" level="project" />
58+
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:10.1.1" level="project" />
59+
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:10.1.1" level="project" />
60+
<orderEntry type="library" name="Maven: org.springframework:spring-web:6.0.2" level="project" />
61+
<orderEntry type="library" name="Maven: io.micrometer:micrometer-observation:1.10.2" level="project" />
62+
<orderEntry type="library" name="Maven: io.micrometer:micrometer-commons:1.10.2" level="project" />
63+
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:6.0.2" level="project" />
64+
<orderEntry type="library" name="Maven: org.springframework:spring-expression:6.0.2" level="project" />
65+
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:3.0.0" level="project" />
66+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:3.0.0" level="project" />
67+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:3.0.0" level="project" />
68+
<orderEntry type="library" scope="RUNTIME" name="Maven: com.mysql:mysql-connector-j:8.0.31" level="project" />
69+
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" />
70+
<orderEntry type="library" name="Maven: org.modelmapper:modelmapper:2.3.9" level="project" />
71+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:3.0.0" level="project" />
72+
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:10.1.1" level="project" />
73+
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:8.0.0.Final" level="project" />
74+
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:3.0.2" level="project" />
75+
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:3.0.0" level="project" />
76+
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:3.0.0" level="project" />
77+
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:3.0.0" level="project" />
78+
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.7.0" level="project" />
79+
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.4.8" level="project" />
80+
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:2.4.8" level="project" />
81+
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:9.1" level="project" />
82+
<orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:4.0.0" level="project" />
83+
<orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.activation:jakarta.activation-api:2.1.0" level="project" />
84+
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.23.1" level="project" />
85+
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
86+
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.9.1" level="project" />
87+
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.9.1" level="project" />
88+
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
89+
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.9.1" level="project" />
90+
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.2" level="project" />
91+
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.9.1" level="project" />
92+
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.9.1" level="project" />
93+
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.9.1" level="project" />
94+
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:4.8.1" level="project" />
95+
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.12.19" level="project" />
96+
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
97+
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:4.8.1" level="project" />
98+
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.1" level="project" />
99+
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
100+
<orderEntry type="library" name="Maven: org.springframework:spring-core:6.0.2" level="project" />
101+
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:6.0.2" level="project" />
102+
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:6.0.2" level="project" />
103+
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.9.0" level="project" />
104+
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:3.0.0" level="project" />
105+
<orderEntry type="library" name="Maven: org.springframework:spring-aop:6.0.2" level="project" />
106+
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:6.0.0" level="project" />
107+
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:6.0.0" level="project" />
108+
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:6.0.0" level="project" />
109+
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:6.0.0" level="project" />
110+
<orderEntry type="library" scope="RUNTIME" name="Maven: io.jsonwebtoken:jjwt-impl:0.11.5" level="project" />
111+
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt-api:0.11.5" level="project" />
112+
<orderEntry type="library" scope="RUNTIME" name="Maven: io.jsonwebtoken:jjwt-jackson:0.11.5" level="project" />
113+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.14.1" level="project" />
114+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.14.1" level="project" />
115+
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.14.1" level="project" />
116+
</component>
117+
</module>
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
package com.springboot.blog;
22

3-
import com.springboot.blog.entity.Role;
4-
import com.springboot.blog.repository.RoleRepository;
53
import org.modelmapper.ModelMapper;
6-
import org.springframework.beans.factory.annotation.Autowired;
7-
import org.springframework.boot.CommandLineRunner;
84
import org.springframework.boot.SpringApplication;
95
import org.springframework.boot.autoconfigure.SpringBootApplication;
106
import org.springframework.context.annotation.Bean;
117

128
@SpringBootApplication
13-
public class SpringbootBlogRestApiApplication implements CommandLineRunner {
9+
public class SpringbootBlogRestApiApplication {
1410

1511
@Bean
1612
public ModelMapper modelMapper(){
@@ -21,19 +17,4 @@ public static void main(String[] args) {
2117
SpringApplication.run(SpringbootBlogRestApiApplication.class, args);
2218
}
2319

24-
@Autowired
25-
private RoleRepository roleRepository;
26-
27-
@Override
28-
public void run(String... args) throws Exception {
29-
30-
Role adminRole = new Role();
31-
adminRole.setName("ROLE_ADMIN");
32-
roleRepository.save(adminRole);
33-
34-
Role userRole = new Role();
35-
userRole.setName("ROLE_USER");
36-
roleRepository.save(userRole);
37-
38-
}
3920
}

0 commit comments

Comments
 (0)