In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "springboot configuration database password special character error report how to solve", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "springboot configuration database password special character error report how to solve" it!
Configure database password special character error
General springboot projects will have application.yml or application.properties files, the password may have special characters when you need to connect to the database, the .properties file will not report an error, but the .yml file will report an error.
Solve
The value corresponding to password in yml is enclosed in single quotation marks ('! @ test'), as follows
Spring: datasource: password:'! @ test' type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://localhost:3306/test?characterEncoding=utf-8 username: rootyml file password special characters cause startup error
In a project, I want to connect to the production database to see the data, and report an error when changing the password of the connection pool. Record it specially.
There are two reasons
First: it may be that the':'of the password in the yml file is not followed by a space bar and cannot be the Tab key
Second: there may be a problem with parsing because the password contains special characters.
Solution.
Put single quotation marks on the password to solve; for example
Url: jdbc:mysql://localhost:3306/test?characterEncoding=utf-8 username: root password:'!
In this way, you won't make a mistake; I hope it can help you and remind yourself.
At this point, I believe that everyone on the "springboot configuration database password special character error how to solve" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.