[Solved] ERROR org.springframework.boot.SpringApplication – Application run failed org.yaml.snakeyaml.scanner

 ERROR org.springframework.boot.SpringApplication - Application run failed
org.yaml.snakeyaml.scanner.ScannerException: while scanning a tag
 in 'reader', line 7, column 15:
        password: !QAZ2wsx#EDC
                  ^
expected ' ', but found '#' (35)
 in 'reader', line 7, column 23:
        password: !QAZ2wsx#EDC
                          ^

	at org.yaml.snakeyaml.scanner.ScannerImpl.scanTag(ScannerImpl.java:1544)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchTag(ScannerImpl.java:954)
	at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:372)
	at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:227)
	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:586)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
	at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:136)
	at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:257)
	at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:248)
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:236)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162)
	at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:257)
	at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:248)
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:236)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162)
	at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:257)
	at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:248)
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:236)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:162)
	at org.yaml.snakeyaml.composer.Composer.getNode(Composer.java:95)
	at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:134)
	at org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.getData(OriginTrackedYamlLoader.java:99)
	at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:512)
	at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:200)
	at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:164)
	at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:84)
	at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50)
	at org.springframework.boot.context.config.StandardConfigDataLoader.load(StandardConfigDataLoader.java:48)
	at org.springframework.boot.context.config.StandardConfigDataLoader.load(StandardConfigDataLoader.java:34)
	at org.springframework.boot.context.config.ConfigDataLoaders.load(ConfigDataLoaders.java:102)
	at org.springframework.boot.context.config.ConfigDataImporter.load(ConfigDataImporter.java:118)
	at org.springframework.boot.context.config.ConfigDataImporter.resolveAndLoad(ConfigDataImporter.java:82)
	at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors

Check whether there are special characters in the YML configuration file
Username: root
password: “! Qaz2wsx#edc”
add double quotation marks to the password. Because the special characters caused by coding problems cannot be recognized, the database cannot be connected

Read More: