When maven packaged as a jar file, for the system to solve the scope of the jar package can not be packaged into a jar file solutions.

scope for the maven system default is not packaged go.

Online search a lot of solutions, which are mostly wrong, especially the Chinese community, not mentioned on the basic points. Configuration resource, the more easily lead to other problems.

Finally, turn on GitHub / the Spring-the Boot Issue of years, finally found the right solution.

Very simple.

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <configuration>
    <includeSystemScope>true</includeSystemScope>
  </configuration>
</plugin>

  

Guess you like

Origin www.cnblogs.com/musarona/p/11204179.html