先说原因,因为Spring底层读取properties时候 有关键字username,而这个username正是电脑系统默认的名称。
So! 改个名 完事~
url=jdbc:mysql://localhost:3306/lib_web?useUnicode=true&characterEncoding=UTF-8
#TODO username 是关键字
username=root
Mysql.password=121
更改之后~
url=jdbc:mysql://localhost:3306/lib_web?useUnicode=true&characterEncoding=UTF-8
#TODO username 是关键字
Mysql.username=root
Mysql.password=121