What about the special characters in the configuration file in SpringBoot?

what is happening now is that the database password in SpringBoot"s configuration file application.yml contains special characters (roughly similar to @ $% WNB5m ), resulting in the following error:

java.lang.IllegalStateException: Failed to load property source from location "classpath:/application.yml"

can be changed to ordinary English + numeric characters, so is there any solution?

Mar.22,2021

escape or ASCII code


"double quotation marks" enclose


well, there is no problem related to SpringBoot directly. I did not expect that it is the problem of ASCII itself. As long as double quotation marks are added, special characters can be included, and single quotation marks will be used for escape operation. For related rules, please refer to http://rxliuli.com/2018/07/01.

.
Menu