Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMLABSBRN-960 BE: update Spring, Kotlin to latest #2143

Merged
merged 1 commit into from Jan 29, 2022

Conversation

Shterneregen
Copy link
Collaborator

@Shterneregen Shterneregen commented Jan 17, 2022

EPMLABSBRN-960

  • Spring Boot: 2.4.3 --> 2.5.8
  • Kotlin: 1.4.20 --> 1.6.10
  • build.gradle --> build.gradle.kts
  • settings.gradle --> settings.gradle.kts
  • Changes in UserAccountServiceTest and LopotkoProcessorTest were made because these tests got failed in Spring Boot 2.6.2, and I left it for the future

At the beginning, I wanted to use the latest stable Spring Boot 2.6.2, but I got an error while starting the app:
Failed to start bean 'documentationPluginsBootstrapper'
I investigated it a bit, and found that it's an issue between Spring Boot and Swagger

Spring Boot - Swagger Documentation doesn't work

The problem seems to be that Spring Boot switched from Ant Path Matching to using a PathPatternParser, see
spring-projects/spring-boot#24645
spring-projects/spring-boot#24805

Failed to start bean 'documentationPluginsBootstrapper' in spring data rest

I got same issue using springfox-swagger2 and springfox-swagger-ui version(3.0.0), spring-boot version(2.6.2)
The way to resolve this issue is by adding pathmatcher in application. properties or application.yml
for application.properties:
spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER

Springboot 2.6.0 / Spring fox 3 - Failed to start bean 'documentationPluginsBootstrapper'

This problem's caused by a bug in Springfox. It's making an assumption about how Spring MVC is set up that doesn't always hold true. Specifically, it's assuming that MVC's path matching will use the Ant-based path matcher and not the PathPattern-based matcher. PathPattern-based matching has been an option for some time now and is the default as of Spring Boot 2.6.

As described in Spring Boot 2.6's release notes, you can restore the configuration that Springfox assumes will be used by setting spring.mvc.pathmatch.matching-strategy to ant-path-matcher in your application.properties file. Note that this will only work if you are not using Spring Boot's Actuator. The Actuator always uses PathPattern-based parsing, irrespective of the configured matching-strategy. A change to Springfox will be required if you want to use it with the Actuator in Spring Boot 2.6 and later.

@Shterneregen Shterneregen self-assigned this Jan 17, 2022
@github-actions
Copy link

Frontend test coverage: 79.67%

🤷‍♂️ Did not change

@github-actions
Copy link

github-actions bot commented Jan 17, 2022

Gradle Unit and Integration Test Results

  92 files  ±0    92 suites  ±0   48s ⏱️ -3s
360 tests ±0  356 ✔️ ±0  4 💤 ±0  0 ±0 

Results for commit 475b147. ± Comparison against base commit 44a4f9f.

♻️ This comment has been updated with latest results.

@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from 1f6cacd to 505c4f4 Compare January 18, 2022 09:05
@gitpod-io
Copy link

gitpod-io bot commented Jan 18, 2022

@github-actions
Copy link

Frontend test coverage: 79.67%

🤷‍♂️ Did not change

@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from 505c4f4 to e44e084 Compare January 18, 2022 23:02
@github-actions
Copy link

Frontend test coverage: 79.67%

🤷‍♂️ Did not change

@Shterneregen Shterneregen marked this pull request as ready for review January 19, 2022 07:28
@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from e44e084 to f0819a2 Compare January 19, 2022 19:44
@github-actions
Copy link

Frontend test coverage: 79.67%

🤷‍♂️ Did not change

@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from f0819a2 to e757ef3 Compare January 20, 2022 09:01
@github-actions
Copy link

Frontend test coverage: 79.67%

🤷‍♂️ Did not change

@github-actions
Copy link

Frontend test coverage: 77.88%

🤷‍♂️ Did not change

@ElenaSpb ElenaSpb self-assigned this Jan 21, 2022
gradle.properties Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from cd6758b to 729fd47 Compare January 24, 2022 09:43
@github-actions
Copy link

Frontend test coverage: 83.1%

🤷‍♂️ Did not change

1 similar comment
@github-actions
Copy link

Frontend test coverage: 83.1%

🤷‍♂️ Did not change

@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from 836b71e to 6253f9e Compare January 25, 2022 08:41
@github-actions
Copy link

Frontend test coverage: 83.1%

🤷‍♂️ Did not change

…t to latest

Spring Boot            : 2.4.3  -> 2.5.9
Kotlin                 : 1.4.20 -> 1.6.10
kotlinx-coroutines-core: 1.4.2  -> 1.6.0
mockk                  : 1.12.0 -> 1.12.2

For updating Spring Boot to 2.6.* version, additional investigations related to Swagger is needed
@Shterneregen Shterneregen force-pushed the EPMLABSBRN-960-update-dependencies branch from 6253f9e to 475b147 Compare January 28, 2022 07:15
@github-actions
Copy link

Frontend test coverage: 90.77%

🤷‍♂️ Did not change

@sonarcloud
Copy link

sonarcloud bot commented Jan 28, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ElenaSpb ElenaSpb merged commit 00e09da into master Jan 29, 2022
@ElenaSpb ElenaSpb deleted the EPMLABSBRN-960-update-dependencies branch January 29, 2022 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants