Skip to content

Commit d0969bf

Browse files
committed
changed spring boot version to 2.1.8
1 parent 3406b73 commit d0969bf

52 files changed

Lines changed: 2311 additions & 2076 deletions

Some content is hidden

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

.attach_pid5187

Whitespace-only changes.

pom.xml

Lines changed: 157 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,161 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
5-
6-
<groupId>com.sopromadze</groupId>
7-
<artifactId>blogapi</artifactId>
8-
<version>0.0.1-SNAPSHOT</version>
9-
<packaging>jar</packaging>
10-
11-
<name>BlogAPI</name>
12-
<description>Blog API project with Spring Boot</description>
13-
14-
<parent>
15-
<groupId>org.springframework.boot</groupId>
16-
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>2.0.6.RELEASE</version>
18-
<relativePath/> <!-- lookup parent from repository -->
19-
</parent>
20-
21-
<properties>
22-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24-
<java.version>1.8</java.version>
25-
</properties>
26-
27-
<dependencies>
28-
<dependency>
29-
<groupId>org.springframework.boot</groupId>
30-
<artifactId>spring-boot-starter</artifactId>
31-
</dependency>
32-
33-
<dependency>
34-
<groupId>mysql</groupId>
35-
<artifactId>mysql-connector-java</artifactId>
36-
<scope>runtime</scope>
37-
</dependency>
38-
39-
<dependency>
40-
<groupId>org.springframework.boot</groupId>
41-
<artifactId>spring-boot-starter-web</artifactId>
42-
<version>2.0.6.RELEASE</version>
43-
</dependency>
44-
45-
<dependency>
46-
<groupId>org.springframework.boot</groupId>
47-
<artifactId>spring-boot-devtools</artifactId>
48-
<version>2.0.6.RELEASE</version>
49-
</dependency>
50-
51-
<dependency>
52-
<groupId>org.springframework.boot</groupId>
53-
<artifactId>spring-boot-starter-data-jpa</artifactId>
54-
<version>2.0.6.RELEASE</version>
55-
</dependency>
56-
57-
58-
<dependency>
59-
<groupId>org.springframework.boot</groupId>
60-
<artifactId>spring-boot-starter-test</artifactId>
61-
<scope>test</scope>
62-
</dependency>
63-
64-
<dependency>
65-
<groupId>org.springframework.boot</groupId>
66-
<artifactId>spring-boot-starter-security</artifactId>
67-
<version>2.0.6.RELEASE</version>
68-
</dependency>
69-
70-
<dependency>
71-
<groupId>org.springframework.security</groupId>
72-
<artifactId>spring-security-jwt</artifactId>
73-
<version>1.0.9.RELEASE</version>
74-
</dependency>
75-
76-
<dependency>
77-
<groupId>org.springframework.security.oauth</groupId>
78-
<artifactId>spring-security-oauth2</artifactId>
79-
<version>2.3.4.RELEASE</version>
80-
</dependency>
81-
82-
<dependency>
83-
<groupId>io.jsonwebtoken</groupId>
84-
<artifactId>jjwt</artifactId>
85-
<version>0.9.1</version>
86-
</dependency>
87-
88-
<dependency>
89-
<groupId>javax.xml.bind</groupId>
90-
<artifactId>jaxb-api</artifactId>
91-
<version>2.3.1</version>
92-
</dependency>
93-
94-
<dependency>
95-
<groupId>com.fasterxml.jackson.datatype</groupId>
96-
<artifactId>jackson-datatype-jsr310</artifactId>
97-
<version>2.9.7</version>
98-
</dependency>
99-
100-
<dependency>
101-
<groupId>org.apache.commons</groupId>
102-
<artifactId>commons-lang3</artifactId>
103-
<version>3.8.1</version>
104-
</dependency>
105-
106-
<dependency>
107-
<groupId>org.modelmapper</groupId>
108-
<artifactId>modelmapper</artifactId>
109-
<version>2.3.1</version>
110-
</dependency>
111-
112-
113-
</dependencies>
114-
115-
<build>
116-
<plugins>
117-
<plugin>
118-
<groupId>org.springframework.boot</groupId>
119-
<artifactId>spring-boot-maven-plugin</artifactId>
120-
<version>2.1.0.RELEASE</version>
121-
<configuration>
122-
<mainClass>com.sopromadze.blogapi.BlogApiApplication</mainClass>
123-
</configuration>
124-
<executions>
125-
<execution>
126-
<goals>
127-
<goal>repackage</goal>
128-
</goals>
129-
</execution>
130-
</executions>
131-
</plugin>
132-
</plugins>
133-
</build>
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>com.sopromadze</groupId>
8+
<artifactId>blogapi</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
<packaging>jar</packaging>
11+
12+
<name>BlogAPI</name>
13+
<description>Blog API project with Spring Boot</description>
14+
15+
<parent>
16+
<groupId>org.springframework.boot</groupId>
17+
<artifactId>spring-boot-starter-parent</artifactId>
18+
<version>2.1.8.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>11</java.version>
26+
</properties>
27+
28+
<dependencies>
29+
<dependency>
30+
<groupId>org.springframework.boot</groupId>
31+
<artifactId>spring-boot-starter</artifactId>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>mysql</groupId>
36+
<artifactId>mysql-connector-java</artifactId>
37+
<scope>runtime</scope>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>org.springframework.boot</groupId>
42+
<artifactId>spring-boot-starter-web</artifactId>
43+
</dependency>
44+
45+
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
46+
<dependency>
47+
<groupId>org.springframework.boot</groupId>
48+
<artifactId>spring-boot-starter-test</artifactId>
49+
<scope>test</scope>
50+
</dependency>
51+
52+
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
53+
<dependency>
54+
<groupId>org.mockito</groupId>
55+
<artifactId>mockito-all</artifactId>
56+
<version>2.0.2-beta</version>
57+
<scope>test</scope>
58+
</dependency>
59+
60+
<!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-test -->
61+
<dependency>
62+
<groupId>org.springframework.security</groupId>
63+
<artifactId>spring-security-test</artifactId>
64+
<scope>test</scope>
65+
</dependency>
66+
67+
68+
<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-library -->
69+
<dependency>
70+
<groupId>org.hamcrest</groupId>
71+
<artifactId>hamcrest-library</artifactId>
72+
<scope>test</scope>
73+
</dependency>
74+
75+
76+
77+
<dependency>
78+
<groupId>org.springframework.boot</groupId>
79+
<artifactId>spring-boot-devtools</artifactId>
80+
</dependency>
81+
82+
<dependency>
83+
<groupId>org.springframework.boot</groupId>
84+
<artifactId>spring-boot-starter-data-jpa</artifactId>
85+
</dependency>
86+
87+
88+
<dependency>
89+
<groupId>org.springframework.boot</groupId>
90+
<artifactId>spring-boot-starter-test</artifactId>
91+
<scope>test</scope>
92+
</dependency>
93+
94+
<dependency>
95+
<groupId>org.springframework.boot</groupId>
96+
<artifactId>spring-boot-starter-security</artifactId>
97+
</dependency>
98+
99+
<dependency>
100+
<groupId>org.springframework.security</groupId>
101+
<artifactId>spring-security-jwt</artifactId>
102+
<version>1.0.9.RELEASE</version>
103+
</dependency>
104+
105+
<dependency>
106+
<groupId>org.springframework.security.oauth</groupId>
107+
<artifactId>spring-security-oauth2</artifactId>
108+
<version>2.3.4.RELEASE</version>
109+
</dependency>
110+
111+
<dependency>
112+
<groupId>io.jsonwebtoken</groupId>
113+
<artifactId>jjwt</artifactId>
114+
<version>0.9.1</version>
115+
</dependency>
116+
117+
<dependency>
118+
<groupId>javax.xml.bind</groupId>
119+
<artifactId>jaxb-api</artifactId>
120+
</dependency>
121+
122+
<dependency>
123+
<groupId>com.fasterxml.jackson.datatype</groupId>
124+
<artifactId>jackson-datatype-jsr310</artifactId>
125+
</dependency>
126+
127+
<dependency>
128+
<groupId>org.apache.commons</groupId>
129+
<artifactId>commons-lang3</artifactId>
130+
</dependency>
131+
132+
<dependency>
133+
<groupId>org.modelmapper</groupId>
134+
<artifactId>modelmapper</artifactId>
135+
<version>2.3.1</version>
136+
</dependency>
137+
138+
139+
</dependencies>
140+
141+
<build>
142+
<plugins>
143+
<plugin>
144+
<groupId>org.springframework.boot</groupId>
145+
<artifactId>spring-boot-maven-plugin</artifactId>
146+
<configuration>
147+
<mainClass>com.sopromadze.blogapi.BlogApiApplication</mainClass>
148+
</configuration>
149+
<executions>
150+
<execution>
151+
<goals>
152+
<goal>repackage</goal>
153+
</goals>
154+
</execution>
155+
</executions>
156+
</plugin>
157+
</plugins>
158+
</build>
134159

135160

136161
</project>
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
package com.sopromadze.blogapi;
22

3-
import com.sopromadze.blogapi.security.JwtAuthenticationFilter;
3+
import java.util.TimeZone;
4+
5+
import javax.annotation.PostConstruct;
6+
47
import org.springframework.boot.SpringApplication;
58
import org.springframework.boot.autoconfigure.SpringBootApplication;
69
import org.springframework.boot.autoconfigure.domain.EntityScan;
710
import org.springframework.context.annotation.Bean;
811
import org.springframework.data.convert.Jsr310Converters;
912

10-
import javax.annotation.PostConstruct;
11-
import java.util.TimeZone;
13+
import com.sopromadze.blogapi.security.JwtAuthenticationFilter;
1214

1315
@SpringBootApplication
14-
@EntityScan(basePackageClasses = {
15-
BlogApiApplication.class,
16-
Jsr310Converters.class
17-
})
16+
@EntityScan(basePackageClasses = { BlogApiApplication.class, Jsr310Converters.class })
17+
1818
public class BlogApiApplication {
1919

20-
public static void main(String[] args) {
21-
SpringApplication.run(BlogApiApplication.class, args);
22-
}
20+
public static void main(String[] args) {
21+
SpringApplication.run(BlogApiApplication.class, args);
22+
}
2323

24-
@PostConstruct
25-
void init(){
26-
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
27-
}
24+
@PostConstruct
25+
void init() {
26+
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
27+
}
2828

29-
@Bean
30-
public JwtAuthenticationFilter jwtAuthenticationFilter() {
31-
return new JwtAuthenticationFilter();
32-
}
29+
@Bean
30+
public JwtAuthenticationFilter jwtAuthenticationFilter() {
31+
return new JwtAuthenticationFilter();
32+
}
3333

3434
}

src/main/java/com/sopromadze/blogapi/config/WebMvcConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
1111
public void addCorsMappings(CorsRegistry registry){
1212
registry.addMapping("/**")
1313
.allowedOrigins("*")
14-
.allowedMethods("HEAD", "OPTIONS", "GET", "POST", "PUT", "PATCH", "DELETE")
14+
.allowedMethods("GET", "POST", "PUT", "DELETE")
1515
.maxAge(MAX_AGE_SECS);
1616
}
1717
}

src/main/java/com/sopromadze/blogapi/controller/AlbumController.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@
1717
@RestController
1818
@RequestMapping("/api/albums")
1919
public class AlbumController {
20-
private final AlbumService albumService;
21-
private final PhotoService photoService;
22-
23-
@Autowired
24-
public AlbumController(AlbumService albumService, PhotoService photoService) {
25-
this.albumService = albumService;
26-
this.photoService = photoService;
27-
}
20+
@Autowired
21+
private AlbumService albumService;
22+
23+
@Autowired
24+
private PhotoService photoService;
2825

2926
@GetMapping
3027
public PagedResponse<Album> getAllAlbums(

0 commit comments

Comments
 (0)