Command line is too long. Shorten command line for NariPmisApplication or also for Spring Boot default configuration
时间: 2023-11-10 18:02:35 浏览: 114
To shorten the command line for the NariPmisApplication or any Spring Boot application, you can make use of the `spring.config.name` and `spring.config.location` properties.
1. Use `spring.config.name` property: By default, Spring Boot looks for configuration files with the name `application`. You can create a custom configuration file with a different name, such as `custom-config.properties`, and use the `spring.config.name` property to specify the name of the configuration file. For example:
```
java -jar myapp.jar --spring.config.name=custom-config
```
2. Use `spring.config.location` property: If you have your configuration files in a specific directory, you can use the `spring.config.location` property to specify the location of the directory. For example:
```
java -jar myapp.jar --spring.config.location=file:/path/to/configs/
```
By using these properties, you can organize your configuration files and avoid having a long command line.
阅读全文