关键的一段在这里
Adding [localProperties] PropertySource with lowest search precedence Searching for key 'driver' in [environmentProperties] Searching for key 'driver' in [systemProperties] Searching for key 'driver' in [systemEnvironment] Could not find key 'driver' in any property source. Returning [null] Searching for key 'driver' in [localProperties] Found key 'driver' in [localProperties] with type [String] and value 'com.mysql.jdbc.Driver' Searching for key 'url' in [environmentProperties] Searching for key 'url' in [systemProperties] Searching for key 'url' in [systemEnvironment] Could not find key 'url' in any property source. Returning [null] Searching for key 'url' in [localProperties] Found key 'url' in [localProperties] with type [String] and value 'jdbc:mysql://localhost:3306/azmp' Searching for key 'username' in [environmentProperties] Searching for key 'username' in [systemProperties] Searching for key 'username' in [systemEnvironment] PropertySource [systemEnvironment] contains 'USERNAME' PropertySource [systemEnvironment] does not contain 'username', but found equivalent 'USERNAME' Found key 'username' in [systemEnvironment] with type [String] and value 'Administrator' Found key 'username' in [environmentProperties] with type [String] and value 'Administrator'
之前的dirverclass和url都是从localProperties中获取的,
可是username是从systemEnvironment中获取的,
求有经验的大神教我如何解决
把username改成user试试