has the following scenario :
deputy general manager needs to deploy the system. The system is written by spring boot + gradle, but it is written according to the module. It is packaged as war package, and
is used
Java – jar XXX. War p>
problem comes, database configuration needs to be changed, port needs to be changed, various address changes, but the configuration file is in the package, cannot be changed. So you need to use the command to specify an external configuration file to specify the configuration
directly
java-jar-dspring.config. location=application.yml XXXX. War
p>
command inside the application. The yml in the XXX. The war directory, at the same level can be specified, so that you can use the configuration files outside the inside of the cover off the war file configuration file. p>
is done.
Read More:
- Failure of spring boot configuration server port
- Command line is too long. Shorten command line for QuestionnaireApplication or also for Spring Boot
- After modifying the Tomcat configuration file in development, the modified configuration file will be automatically restored after ecplise starts Tomcat
- Spring boot problem 1: error reporting life processing instructions for building a spring boot project
- The spring boot project was first created, pom.xml The error is Maven configuration problem. How to solve it?
- Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.4.0:repackage failed
- Git command line configuration and configuration file to solve clone error libressl_ connect: SSL_ ERROR_ SYSCALL in connection to github. com:443
- The spring boot project directly replaces the referenced jar package
- spring boot Whitelabel Error Page
- In the XML configuration file of spring jdbc.properties The connection to the database failed due to garbled code
- [Java] spring transaction control configuration error, application- persstence.xml Transaction manager report red in file
- Spring boot prompt could not resolve placeholder in string value
- There is no spring initializer solution when idea starts
- Spring boot problem solving record (1)
- Spring boot integrates es cluster error report collection
- Spring boot can’t scan XML (invalid bound statement (not found))
- Spring boot running appears java.lang.IllegalStateException : Failed to load ApplicationContext
- Spring boot project running error: Servlet.service () for servlet [dispatcherServlet] threw exception
- Spring boot thymeleaf crud implements simple functions of adding, deleting, modifying and querying
- Add PageHelper spring boot starter dependency to springboot and report an error