In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Springboot source code how to analyze the project structure, in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Summary of project structure for Springboot source code analysis:
Whether we extract it from IDEA or other SDS development tools or https://start.spring.io/, we will get the same pom.xml file 4.0.0 org.springframework.boot spring-boot-starter-parent 2.1.6.RELEASE.
Com.github.dqqzj springboot 0.0.1-SNAPSHOT springboot jar Demo project for Spring Boot 1.8 org.springframework.boot spring-boot-starter org.springframework.boot spring-boot-starter-test test Org.springframework.boot spring-boot-maven-plugin
The meaning of parent tag
Find the spring-boot-starter-parent coordinates of the local warehouse
4.0.0 org.springframework.boot spring-boot-dependencies 2.1.6.RELEASE.. /.. / spring-boot-dependenciesspring-boot-starter-parentpomSpring Boot Starter ParentParent pom providing dependency and plugin management for applications built with Maven https://projects.spring.io/spring-boot/#/spring-boot-starter-parent UTF-8 1.8 @ ${java.version} UTF-8 ${java.version} true ${basedir} / src/main/resources * * / application*.yml * * / application*.yaml * * / application*.properties ${basedir} / src/main/resources * * / application*.yml * * / application*.yaml * * / application*.properties org.jetbrains.kotlin Kotlin-maven-plugin ${kotlin.version} compile test-compile $ {java.version} true maven-compiler-plugin true maven-failsafe-plugin integration-test verify ${project.build.outputDirectory} Maven-jar-plugin ${start-class} true maven-war-plugin ${start-class} true Org.codehaus.mojo exec-maven-plugin ${start-class} maven-resources-plugin ${resource.delimiter} false pl.project13.maven git- Commit-id-plugin revision true yyyy-MM-dd'T'HH:mm:ssZ true ${project.build.outputDirectory} / git.properties org.springframework.boot spring-boot-maven-plugin Repackage repackage ${start-class} maven-shade-plugin package shade META-INF/spring.handlers META-INF/spring.factories META-INF/spring.schemas ${start -class} org.springframework.boot spring-boot-maven-plugin 2.1.6.RELEASE true true *: * META-INF/*.SF META-INF/*.DSA META-INF/*.RSA org.eclipse.m2e lifecycle-mapping 1.0.0 Org.codehaus.mojo flatten-maven-plugin [1.0.0 ) flatten org.apache.maven.plugins maven-checkstyle-plugin [3.0.0 ) check
Focus
Org.springframework.boot spring-boot-dependencies 2.1.6.RELEASE. /.. / spring-boot-dependencies ```indicates that our project can be modified to replace the original project `parent` tag.-org.springframework.boot spring-boot-maven-plugin Repackage repackage ${start-class} `repackage` is required, otherwise it will not start properly when you hit the jar package. ! [file] (https://cache.yisu.com/upload/information/20210524/347/779545.jpg) can org.springframework.boot spring-boot-maven-plugin by adding `repackage` to the configuration file Repackage `IDEA` comes with the `maven` tool! [file] (the https://cache.yisu.com/upload/information/20210524/347/779546.jpg)`mvnw` script command `mvnw.cmd` is based on `linux`. The script command `.mvn` contains the download path and version of `maven`, which means that instead of downloading `maven` by ourselves, we can directly use the tools provided to us by `IDEA`. It's just not usually done. # the role of `repackage`-[official documentation] (under normal https://docs.spring.io/spring-boot/docs/current/maven-plugin/repackage-mojo.html)- packaging, two files such as `repackage` and `original,springboot-0.0.1- SNAPSHOT.jar` will be generated The function of `repackage` is to repackage `springboot-0.0.1- SNAPSHOT.jar.pragal` into the `SNAPSHOT.jar` that we can execute. This is the answer to the question about how the Springboot source code analyzes the project structure. I hope the above content can be of some help to everyone. If you still have a lot of doubts to be solved, you can follow the industry information channel for more relevant knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.