In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about how to read pom file information in springboot, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Problem solved
Springboot (of course, anything else) this profile is required for multi-environment switching, which is not convenient for packaging.
Resolve:
The configuration file can read the configuration in the pom file and select different configurations to be injected into the configuration file of springboot according to the command.
Pom profile:
Dev true dev http:// Localhost:5501 test test http://test. Xxxx.com/xxx prd prd http://api.xxx. The revised writing method of cn/xxx
Of course, other configuration items can be written in the same way. the advantage of writing this way is that you only need to modify one place and nothing else.
Maven Packaging Command
Mvn clean package-Ptest so that it can be packed into a test environment.
Some problems that may arise
Placeholders can also be written this way @ configured key@, is not recommended
Report @ @ parsing error and execute the packaging command again: mvn clean package-Ptest
Modified the configuration in the pom file, and started the project environment again without change, because ide started your previous package, so you need to re-use the packaging command to make a new package.
The above is how to read pom file information in springboot. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
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.