Spring updating download to 1.4 broke my project with multiple modules - perhaps due to a change in banner layout

I upgraded to Spring Boot 1.4.0 and my Maven project does not compile. Here is the scenario:

  • Module 1 / Spring Download
  • Module 2 / Spring Module 1 Dependent Download

When I compile module 2, I get errors that packages / classes do not exist (they exist in module 1). Maven correctly installed the class patch (jar was added to it from the target of module 1).

When I upgrade to Spring Boot 1.3.6, it compiles without any problems.

I checked the release notes for Spring Boot 1.4, and there is no information about any actions that need to be performed in this area.

Have you observed the same behavior with Spring Boot 1.4?

I have such a configuration that allows me to check. Both modules are microservices, and I have tests for module 2 that I want to run without starting module 1 as a separate microservice.

+4
source share
2 answers

You use the thick jar of module 1 as a dependency for module 2. So you basically embed the complete application from module 1 in module 2. You should not do this.

In 1.4, classes have moved to BOOT-INF/classesso that they are no longer found. I assume that there is a good side effect so that you know that your project setup is broken.

, jar ( ) 1. 1 ? , spring-boot-maven-plugin. , classifier .

+5

MODULE, ZIP, , 1.4.x. Zip layout BOOT-INF/classe/**, root.

+3

Source: https://habr.com/ru/post/1651512/


All Articles