Skip to content

Commit 5cc09ac

Browse files
committed
build: migrate to Spring Boot 2.0.9.RELEASE
This also updates: - Spring Framework to 5.0.13.RELEASE - Spring Security to 5.0.12.RELEASE - Hibernate Validator to 6.0.16.Final and javax.validation to 2.0.1.Final - thymeleaf-extras-springsecurity4 to thymeleaf-extras-springsecurity5 3.0.4.RELEASE - Jetty to 9.4.19.v20190610 Changelogs: * Spring Boot: - https://spring.io/blog/2017/05/16/spring-boot-2-0-0-m1-available-now - https://spring.io/blog/2017/06/16/spring-boot-2-0-0-m2-available-now - https://spring.io/blog/2017/07/26/spring-boot-2-0-0-m3-available-now - https://spring.io/blog/2017/09/15/spring-boot-2-0-0-m4-available-now - https://spring.io/blog/2017/09/15/security-changes-in-spring-boot-2-0-m4 - https://spring.io/blog/2017/10/12/spring-boot-2-0-0-m5-available-now - https://spring.io/blog/2017/11/06/spring-boot-2-0-0-m6-available-now - https://spring.io/blog/2017/11/30/spring-boot-2-0-0-m7-available-now - https://spring.io/blog/2018/01/31/spring-boot-2-0-0-rc1-available-now - https://spring.io/blog/2018/02/21/spring-boot-2-0-0-rc2-available-now - https://spring.io/blog/2018/03/01/spring-boot-2-0-goes-ga - https://spring.io/blog/2018/04/05/spring-boot-2-0-1-available-now - https://spring.io/blog/2018/05/09/spring-boot-2-0-2 - https://spring.io/blog/2018/06/14/spring-boot-2-0-3-available-now - https://spring.io/blog/2018/07/30/spring-boot-2-0-4-available-now - https://spring.io/blog/2018/09/12/spring-boot-2-0-5 - https://spring.io/blog/2018/10/16/spring-boot-2-0-6 - https://spring.io/blog/2018/10/16/spring-project-vulnerability-reports-published - https://spring.io/blog/2018/11/30/spring-boot-2-0-7-available-now - https://spring.io/blog/2019/01/11/spring-boot-2-0-8-released - https://spring.io/blog/2019/04/03/spring-boot-2-0-9-released - https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes - https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Configuration-Changelog - https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide - https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Security-2.0 - https://github.com/spring-projects/spring-boot/wiki/Relaxed-Binding-2.0 * Spring Framework: - https://spring.io/blog/2016/07/28/spring-framework-5-0-m1-released - https://spring.io/blog/2016/09/21/spring-framework-5-0-m2-released - https://spring.io/blog/2016/11/08/spring-framework-5-0-m3-released - https://spring.io/blog/2016/12/30/spring-framework-5-0-m4-released - https://spring.io/blog/2017/02/23/spring-framework-5-0-m5-released - https://spring.io/blog/2017/02/23/spring-framework-5-0-m5-update - https://spring.io/blog/2017/05/08/spring-framework-5-0-goes-rc1 - https://spring.io/blog/2017/06/14/spring-framework-5-0-rc2-available-now - https://spring.io/blog/2017/07/24/spring-framework-5-0-rc3-on-the-way-to-ga - https://spring.io/blog/2017/09/11/spring-framework-5-0-rc4-available-now - https://spring.io/blog/2017/09/28/spring-framework-5-0-goes-ga - https://spring.io/blog/2017/10/24/spring-framework-5-0-1-available-now - https://spring.io/blog/2017/11/27/spring-framework-5-0-2-and-4-3-13-available-now - https://spring.io/blog/2018/01/23/spring-framework-5-0-3-and-4-3-14-available-now - https://spring.io/blog/2018/02/19/spring-framework-5-0-4-available-now - https://spring.io/blog/2018/04/03/spring-framework-5-0-5-and-4-3-15-available-now - https://spring.io/blog/2018/04/05/multiple-cve-reports-published-for-the-spring-framework - https://spring.io/blog/2018/05/08/spring-framework-4-3-17-and-5-0-6-available-now - https://spring.io/blog/2018/06/13/spring-framework-5-0-7-and-4-3-18-available-now - https://spring.io/blog/2018/07/26/spring-framework-5-0-8-available-now - https://spring.io/blog/2018/09/07/spring-framework-5-1-rc3-5-0-9-and-4-3-19-available-now - https://spring.io/blog/2018/10/15/spring-framework-5-1-1-5-0-10-and-4-3-20-available-now - https://spring.io/blog/2018/11/27/spring-framework-5-1-3-5-0-11-and-4-3-21-available-now - https://spring.io/blog/2019/01/09/spring-framework-5-1-4-5-0-12-and-4-3-22-available-now - https://spring.io/blog/2019/04/01/spring-framework-5-1-6-5-0-13-and-4-3-23-available-now - https://github.com/spring-projects/spring-framework/wiki/What's-New-in-Spring-Framework-5.x - https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-5.x - https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-5-FAQ * Spring Security: - https://spring.io/blog/2017/05/11/spring-security-5-0-0-m1 - https://spring.io/blog/2017/06/16/spring-security-5-0-0-m2-released - https://spring.io/blog/2017/07/24/spring-security-5-0-0-m3-released - https://spring.io/blog/2017/09/15/spring-security-5-0-0-m4-released - https://spring.io/blog/2017/10/10/spring-security-5-0-0-m5-released - https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released - https://spring.io/blog/2017/11/28/spring-security-5-0-0-release-released - https://spring.io/blog/2018/01/30/cve-2018-1199-spring-security-5-0-1-4-2-4-4-1-5-released - https://spring.io/blog/2018/02/20/spring-security-5-0-2-released - https://spring.io/blog/2018/02/28/spring-security-5-0-3-released - https://spring.io/blog/2018/04/05/spring-security-5-0-4-and-4-2-5-released - https://spring.io/blog/2018/05/08/spring-security-5-0-5-released - https://spring.io/blog/2018/06/13/spring-security-5-0-6-and-4-2-7-released - https://spring.io/blog/2018/07/26/spring-security-5-0-7-released - https://spring.io/blog/2018/09/11/spring-security-5-0-8-and-4-2-8-released - https://spring.io/blog/2018/10/16/spring-security-5-1-1-5-0-9-and-4-2-9-released - https://spring.io/blog/2018/11/29/spring-security-5-1-2-5-0-10-4-2-10-released - https://spring.io/blog/2019/01/11/spring-security-5-1-3-5-0-11-4-2-11-released - https://spring.io/blog/2019/04/03/spring-security-5-1-5-5-0-12-4-2-12-released - https://spring.io/blog/2019/04/05/cve-2019-3795-spring-security-4-2-12-5-0-12-5-1-5-released * Hibernate Validator: - https://developer.jboss.org/wiki/HibernateValidatorMigrationGuide - https://in.relation.to/2017/02/16/hibernate-validator-600-alpha1-out/ - https://in.relation.to/2017/03/30/hibernate-validator-600-alpha2-out/ - https://in.relation.to/2017/05/16/hibernate-validator-600-beta1-out/ - https://in.relation.to/2017/05/24/hibernate-validator-600-beta2-out/ - https://in.relation.to/2017/06/29/hibernate-validator-600-cr1-out/ - https://in.relation.to/2017/07/05/hibernate-validator-600-cr2-out/ - https://in.relation.to/2017/07/11/hibernate-validator-600-cr3-out/ - https://github.com/hibernate/hibernate-validator/blob/615828b4a2b149a31c6882a2a7cae4663492d41f/changelog.txt#L457-L465 - https://in.relation.to/2017/08/07/and-here-comes-hibernate-validator-60/ - https://in.relation.to/2017/08/22/hibernate-validator-602-final-out/ - https://in.relation.to/2017/10/19/hibernate-validator-603-final-out/ - https://in.relation.to/2017/10/25/hibernate-validator-604-final-out/ - https://in.relation.to/2017/11/15/hibernate-validator-605-final-out/ - https://github.com/hibernate/hibernate-validator/blob/615828b4a2b149a31c6882a2a7cae4663492d41f/changelog.txt#L315-L337 - https://in.relation.to/2017/12/20/hibernate-validator-607-final-out/ - https://in.relation.to/2018/03/08/hibernate-validator-608-final-out/ - https://in.relation.to/2018/03/27/hibernate-validator-609-final-out/ - https://in.relation.to/2018/05/15/hibernate-validator-6010-final-out/ - https://in.relation.to/2018/07/18/hibernate-validator-6011-final-out/ - https://in.relation.to/2018/08/13/hibernate-validator-6012-final-out/ - https://in.relation.to/2018/08/23/hibernate-validator-6013-final-out/ - https://in.relation.to/2019/01/07/hibernate-validator-6014-final-out/ - https://in.relation.to/2019/02/18/hibernate-validator-6015-final-out/ - https://in.relation.to/2019/03/21/hibernate-validator-6016-final-out/ Fix #869
1 parent c8d0a70 commit 5cc09ac

21 files changed

+104
-101
lines changed

NEWS.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
0.x (upcoming release)
2+
- (infrastructure) Migrate to Spring Boot 2
23

34
0.4.2
45
- (feature) users can add multiple instances of a series into a collection

docker/postgres.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
- SPRING_DATASOURCE_PASSWORD=secret
1717
- SPRING_DATASOURCE_DRIVER_CLASS_NAME=org.postgresql.Driver
1818
# to test whether it works in prod-like environment
19-
#- LIQUIBASE_CONTEXTS=scheme,init-data,prod-data
19+
#- SPRING_LIQUIBASE_CONTEXTS=scheme,init-data,prod-data
2020
#volumes:
2121
# to use a WAR file from filesystem and avoid to build an image every time
2222
#- ../target/mystamps.war:/data/mystamps/mystamps.war:ro

docker/prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ services:
1515
# override password from application-prod.properties to be the same as in db
1616
- SPRING_DATASOURCE_PASSWORD=secret
1717
# only for testing locally. See also: https://github.com/php-coder/mystamps/issues/670
18-
- SERVER_SESSION_COOKIE_SECURE=false
18+
- SERVER_SERVLET_SESSION_COOKIE_SECURE=false
1919
volumes:
2020
- ./application-prod.properties:/data/mystamps/application-prod.properties:ro
2121
# to use a WAR file from filesystem and avoid to build an image every time

pom.xml

+38-35
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</dependency>
5050

5151
<dependency>
52-
<groupId>org.hibernate</groupId>
52+
<groupId>org.hibernate.validator</groupId>
5353
<artifactId>hibernate-validator</artifactId>
5454
<version>${hibernate-validator.version}</version>
5555
</dependency>
@@ -66,7 +66,7 @@
6666
<version>${slf4j.version}</version>
6767
</dependency>
6868

69-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter/pom.xml -->
69+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter/pom.xml -->
7070
<dependency>
7171
<groupId>org.springframework.boot</groupId>
7272
<artifactId>spring-boot-starter</artifactId>
@@ -78,19 +78,13 @@
7878
</exclusions>
7979
</dependency>
8080

81-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-jdbc/pom.xml -->
81+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-jdbc/pom.xml -->
8282
<dependency>
8383
<groupId>org.springframework.boot</groupId>
8484
<artifactId>spring-boot-starter-jdbc</artifactId>
85-
<exclusions>
86-
<exclusion>
87-
<groupId>org.apache.tomcat</groupId>
88-
<artifactId>tomcat-jdbc</artifactId>
89-
</exclusion>
90-
</exclusions>
9185
</dependency>
9286

93-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-jetty/pom.xml -->
87+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-jetty/pom.xml -->
9488
<dependency>
9589
<groupId>org.springframework.boot</groupId>
9690
<artifactId>spring-boot-starter-jetty</artifactId>
@@ -110,19 +104,19 @@
110104
</exclusions>
111105
</dependency>
112106

113-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-logging/pom.xml -->
107+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-logging/pom.xml -->
114108
<dependency>
115109
<groupId>org.springframework.boot</groupId>
116110
<artifactId>spring-boot-starter-logging</artifactId>
117111
</dependency>
118112

119-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-security/pom.xml -->
113+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-security/pom.xml -->
120114
<dependency>
121115
<groupId>org.springframework.boot</groupId>
122116
<artifactId>spring-boot-starter-security</artifactId>
123117
</dependency>
124118

125-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-test/pom.xml -->
119+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-test/pom.xml -->
126120
<dependency>
127121
<groupId>org.springframework.boot</groupId>
128122
<artifactId>spring-boot-starter-test</artifactId>
@@ -143,22 +137,26 @@
143137
<groupId>org.hamcrest</groupId>
144138
<artifactId>hamcrest-library</artifactId>
145139
</exclusion>
140+
<exclusion>
141+
<groupId>org.xmlunit</groupId>
142+
<artifactId>xmlunit-core</artifactId>
143+
</exclusion>
146144
</exclusions>
147145
</dependency>
148146

149-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml -->
147+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml -->
150148
<dependency>
151149
<groupId>org.springframework.boot</groupId>
152150
<artifactId>spring-boot-starter-thymeleaf</artifactId>
153151
<exclusions>
154152
<exclusion>
155-
<groupId>nz.net.ultraq.thymeleaf</groupId>
156-
<artifactId>thymeleaf-layout-dialect</artifactId>
153+
<groupId>org.thymeleaf.extras</groupId>
154+
<artifactId>thymeleaf-extras-java8time</artifactId>
157155
</exclusion>
158156
</exclusions>
159157
</dependency>
160158

161-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-web/pom.xml -->
159+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-web/pom.xml -->
162160
<dependency>
163161
<groupId>org.springframework.boot</groupId>
164162
<artifactId>spring-boot-starter-web</artifactId>
@@ -196,9 +194,9 @@
196194
<scope>provided</scope>
197195
</dependency>
198196

199-
<!-- https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/?v=5.2#validator-annotation-processor -->
197+
<!-- https://docs.jboss.org/hibernate/validator/6.0/reference/en-US/html_single/#validator-annotation-processor -->
200198
<dependency>
201-
<groupId>org.hibernate</groupId>
199+
<groupId>org.hibernate.validator</groupId>
202200
<artifactId>hibernate-validator-annotation-processor</artifactId>
203201
<version>${hibernate-validator.version}</version>
204202
<scope>provided</scope>
@@ -265,8 +263,8 @@
265263

266264
<dependency>
267265
<groupId>org.thymeleaf.extras</groupId>
268-
<artifactId>thymeleaf-extras-springsecurity4</artifactId>
269-
<version>${thymeleaf-extras-springsecurity4.version}</version>
266+
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
267+
<version>${thymeleaf-extras-springsecurity.version}</version>
270268
<scope>runtime</scope>
271269
</dependency>
272270

@@ -422,6 +420,7 @@
422420
<dependency>
423421
<groupId>org.spockframework</groupId>
424422
<artifactId>spock-core</artifactId>
423+
<version>${spock.version}</version>
425424
<scope>test</scope>
426425
</dependency>
427426

@@ -440,16 +439,16 @@
440439

441440
</dependencies>
442441

442+
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/pom.xml -->
443443
<parent>
444-
<!-- https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-parent/pom.xml -->
445444
<groupId>org.springframework.boot</groupId>
446445
<artifactId>spring-boot-starter-parent</artifactId>
447-
<version>1.5.22.RELEASE</version>
446+
<version>2.0.9.RELEASE</version>
448447
</parent>
449448

450449
<!--
451450
All default versions from Spring Boot can be found there:
452-
https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-dependencies/pom.xml
451+
https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-dependencies/pom.xml
453452
-->
454453
<properties>
455454
<!-- Redefine default value from spring-boot-dependencies -->
@@ -486,7 +485,7 @@
486485
<h2.version>1.4.199</h2.version>
487486

488487
<!-- Redefine default value from spring-boot-dependencies -->
489-
<hibernate-validator.version>5.4.2.Final</hibernate-validator.version>
488+
<hibernate-validator.version>6.0.16.Final</hibernate-validator.version>
490489

491490
<!-- Redefine default value from spring-boot-dependencies -->
492491
<hikaricp.version>3.4.1</hikaricp.version>
@@ -497,19 +496,23 @@
497496
<jacoco.plugin.version>0.8.2</jacoco.plugin.version>
498497
<jasmine.plugin.version>2.2</jasmine.plugin.version>
499498

500-
<!-- Redefine default value from spring-boot-starter-parent (https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-parent/pom.xml) -->
499+
<!--
500+
Redefine default value from spring-boot-starter-parent:
501+
https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/pom.xml
502+
-->
501503
<java.version>1.8</java.version>
502504

503505
<javadoc.plugin.version>3.0.1</javadoc.plugin.version>
506+
<javassist.version>3.21.0-GA</javassist.version>
504507

505508
<!-- Redefine default value from spring-boot-dependencies -->
506509
<javax-mail.version>1.5.4</javax-mail.version>
507510

508511
<!-- Redefine default value from spring-boot-dependencies -->
509-
<javax-validation.version>1.1.0.Final</javax-validation.version>
512+
<javax-validation.version>2.0.1.Final</javax-validation.version>
510513

511514
<!-- Redefine default value from spring-boot-dependencies -->
512-
<jetty.version>9.2.28.v20190418</jetty.version>
515+
<jetty.version>9.4.19.v20190610</jetty.version>
513516

514517
<!-- Don't forget to update version in the ResourceUrl class -->
515518
<jquery.version>1.9.1</jquery.version>
@@ -567,19 +570,20 @@
567570

568571
<sortpom.plugin.version>2.5.0</sortpom.plugin.version>
569572

570-
<!-- Redefine default value from spring-boot-dependencies -->
571573
<spock.version>1.0-groovy-2.0</spock.version>
572-
573574
<spotbugs.plugin.version>3.1.11</spotbugs.plugin.version>
574575

575-
<!-- Define default value for spring-boot-starter-parent (https://github.com/spring-projects/spring-boot/blob/v1.5.22.RELEASE/spring-boot-starters/spring-boot-starter-parent/pom.xml) -->
576+
<!--
577+
Define default value for spring-boot-starter-parent:
578+
https://github.com/spring-projects/spring-boot/blob/v2.0.9.RELEASE/spring-boot-project/spring-boot-starters/spring-boot-starter-parent/pom.xml
579+
-->
576580
<start-class>ru.mystamps.web.support.spring.boot.ApplicationBootstrap</start-class>
577581

578582
<surefire.plugin.version>2.22.0</surefire.plugin.version>
579583
<thumbnailator.version>0.4.8</thumbnailator.version>
580584

581585
<!-- Redefine default value from spring-boot-dependencies -->
582-
<thymeleaf-extras-springsecurity4.version>3.0.2.RELEASE</thymeleaf-extras-springsecurity4.version>
586+
<thymeleaf-extras-springsecurity.version>3.0.4.RELEASE</thymeleaf-extras-springsecurity.version>
583587

584588
<thymeleaf.togglz.version>2.0.1.RELEASE</thymeleaf.togglz.version>
585589

@@ -785,9 +789,8 @@
785789
<showDeprecation>true</showDeprecation>
786790
<showWarnings>true</showWarnings>
787791
<debug>false</debug>
788-
<failOnWarning>true</failOnWarning>
789-
<!-- Required for using method's parameters inside of @PreAuthorize expressions -->
790-
<parameters>true</parameters>
792+
<!-- @todo #869 Fix compilation warnings and enable failOnWarning again -->
793+
<!--<failOnWarning>true</failOnWarning>-->
791794
<!-- Required for ErrorProne -->
792795
<!-- @todo #971 Document ErrorProne tool -->
793796
<compilerArgs>

src/main/config/spotbugs-filter.xml

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
xmlns="https://github.com/spotbugs/filter/3.0.0"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
6+
7+
<!-- @todo #869 Find a better way to deal with SpotBugs warnings in DAO classes -->
8+
<Match>
9+
<ClassType name="~Dao$" />
10+
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
11+
</Match>
612

713
<Match>
814
<Class name="ru.mystamps.web.feature.account.AddUserDbDto" />

src/main/java/ru/mystamps/web/feature/image/FilesystemImagePersistenceStrategy.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ protected Path generateFilePath(File dir, ImageInfoDto image) {
128128
// protected to allow spying
129129
protected void writeToFile(MultipartFile file, Path dest) throws IOException {
130130
// we can't use file.transferTo(dest) there because it creates file
131-
// relatively to directory from spring.http.multipart.location
131+
// relatively to directory from spring.servlet.multipart.location
132132
// in application.properties
133133
// See for details: https://jira.spring.io/browse/SPR-12650
134134
Files.copy(file.getInputStream(), dest);

src/main/java/ru/mystamps/web/feature/series/importing/event/EventsConfig.java

-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.springframework.context.ApplicationListener;
2424
import org.springframework.context.annotation.Bean;
2525
import org.springframework.context.annotation.Configuration;
26-
import org.springframework.context.annotation.DependsOn;
2726
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
2827
import ru.mystamps.web.config.ServicesConfig;
2928
import ru.mystamps.web.feature.category.CategoryService;
@@ -85,9 +84,6 @@ public ApplicationListener<ImportRequestCreated> importRequestCreatedEventListen
8584
);
8685
}
8786

88-
// This bean has logic that access database. To ensure that all migrations have been applied
89-
// we need this dependency. This annotation shouldn't be needed in Spring Boot 2.
90-
@DependsOn("liquibase")
9187
@Bean
9288
public ApplicationListener<DownloadingSucceeded> downloadingSucceededEventListener(
9389
SiteParserService siteParserService,

src/main/java/ru/mystamps/web/support/spring/boot/ApplicationBootstrap.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
ApplicationContext.class,
3535
DispatcherServletContext.class,
3636
ThymeleafViewResolverInitializingBean.class,
37-
JettyServletContainerCustomizer.class,
37+
JettyWebServerFactoryCustomizer.class,
3838
ErrorPagesCustomizer.class
3939
})
4040
public class ApplicationBootstrap {

src/main/java/ru/mystamps/web/support/spring/boot/ErrorPagesCustomizer.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
*/
1818
package ru.mystamps.web.support.spring.boot;
1919

20-
import org.springframework.boot.web.servlet.ErrorPage;
21-
import org.springframework.boot.web.servlet.ErrorPageRegistrar;
22-
import org.springframework.boot.web.servlet.ErrorPageRegistry;
20+
import org.springframework.boot.web.server.ErrorPage;
21+
import org.springframework.boot.web.server.ErrorPageRegistrar;
22+
import org.springframework.boot.web.server.ErrorPageRegistry;
2323
import org.springframework.context.annotation.Configuration;
2424
import org.springframework.http.HttpStatus;
2525
import org.springframework.security.web.firewall.RequestRejectedException;

src/main/java/ru/mystamps/web/support/spring/boot/JettyServletContainerCustomizer.java renamed to src/main/java/ru/mystamps/web/support/spring/boot/JettyWebServerFactoryCustomizer.java

+7-11
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
import org.eclipse.jetty.server.HttpConnectionFactory;
2323
import org.eclipse.jetty.server.Server;
2424
import org.eclipse.jetty.server.ServerConnector;
25-
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
26-
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
27-
import org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory;
28-
import org.springframework.boot.context.embedded.jetty.JettyServerCustomizer;
25+
import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer;
26+
import org.springframework.boot.web.embedded.jetty.JettyServletWebServerFactory;
27+
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
2928
import org.springframework.context.annotation.Configuration;
3029

3130
@Configuration
32-
public class JettyServletContainerCustomizer implements EmbeddedServletContainerCustomizer {
31+
public class JettyWebServerFactoryCustomizer
32+
implements WebServerFactoryCustomizer<JettyServletWebServerFactory> {
3333

3434
private static final JettyServerCustomizer JETTY_CUSTOMIZER = new JettyServerCustomizer() {
3535
@Override
@@ -52,12 +52,8 @@ public void customize(Server server) {
5252
};
5353

5454
@Override
55-
public void customize(ConfigurableEmbeddedServletContainer container) {
56-
if (container instanceof JettyEmbeddedServletContainerFactory) {
57-
JettyEmbeddedServletContainerFactory jetty =
58-
(JettyEmbeddedServletContainerFactory)container;
59-
jetty.addServerCustomizers(JETTY_CUSTOMIZER);
60-
}
55+
public void customize(JettyServletWebServerFactory factory) {
56+
factory.addServerCustomizers(JETTY_CUSTOMIZER);
6157
}
6258

6359
}

src/main/java/ru/mystamps/web/support/spring/boot/ThymeleafViewResolverInitializingBean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.springframework.context.EnvironmentAware;
2727
import org.springframework.context.annotation.Configuration;
2828
import org.springframework.core.env.Environment;
29-
import org.thymeleaf.spring4.view.ThymeleafViewResolver;
29+
import org.thymeleaf.spring5.view.ThymeleafViewResolver;
3030
import ru.mystamps.web.feature.account.AccountUrl;
3131
import ru.mystamps.web.feature.category.CategoryUrl;
3232
import ru.mystamps.web.feature.collection.CollectionUrl;

src/main/java/ru/mystamps/web/support/spring/security/SecurityConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
import org.springframework.beans.factory.annotation.Autowired;
2121
import org.springframework.beans.factory.annotation.Qualifier;
22-
import org.springframework.boot.web.filter.OrderedRequestContextFilter;
2322
import org.springframework.boot.web.servlet.FilterRegistrationBean;
23+
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
2424
import org.springframework.context.ApplicationListener;
2525
import org.springframework.context.MessageSource;
2626
import org.springframework.context.annotation.Bean;

src/main/resources/application-postgres.properties

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ spring.datasource.url: jdbc:postgresql://localhost:5432/mystamps
55
spring.datasource.username: postgres
66
spring.datasource.password:
77
spring.datasource.driver-class-name: org.postgresql.Driver
8-
spring.datasource.initialize: false
8+
spring.datasource.initialization-mode: NEVER
99

1010
# @todo #1054 Extract part of spring.messages configuration to a common profile
11-
spring.messages.cache-seconds: -1
11+
spring.messages.cache-duration: -1
1212
spring.messages.fallback-to-system-locale: false
1313
spring.messages.basename: \
1414
ru/mystamps/i18n/Messages, \
@@ -27,10 +27,10 @@ mailgun.endpoint: http://127.0.0.1:8888/mailgun/send-message
2727
mailgun.password: secret
2828

2929
# @todo #1054 Introduce profiles for liquibase contexts
30-
liquibase.contexts: scheme, init-data, test-data
31-
liquibase.change-log: classpath:/liquibase/changelog.xml
30+
spring.liquibase.contexts: scheme, init-data, test-data
31+
spring.liquibase.change-log: classpath:/liquibase/changelog.xml
3232

33-
logging.level.: INFO
33+
logging.level.root: INFO
3434
logging.level.ru.mystamps: INFO
3535
logging.level.ru.mystamps.web.support.spring.security.SessionLocaleResolverAwareFilter: INFO
3636
logging.level.liquibase: WARN
@@ -42,7 +42,7 @@ app.use-cdn: false
4242
# @todo #1054 Extract list of exclusions to a common profile
4343
#
4444
# Full list of autoconfiguration classes:
45-
# http://docs.spring.io/spring-boot/docs/1.5.x/reference/html/auto-configuration-classes.html
45+
# https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/auto-configuration-classes.html
4646
# The difference between test profile is that we don't need H2ConsoleAutoConfiguration
4747
spring.autoconfigure.exclude: \
4848
org.springframework.boot.autoconfigure.jms.activemq.ActiveMQAutoConfiguration \

0 commit comments

Comments
 (0)