{"action":"created","issue":{"url":"https://api.github.com/repos/alibaba/druid/issues/1864","repository_url":"https://api.github.com/repos/alibaba/druid","labels_url":"https://api.github.com/repos/alibaba/druid/issues/1864/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/druid/issues/1864/comments","events_url":"https://api.github.com/repos/alibaba/druid/issues/1864/events","html_url":"https://github.com/alibaba/druid/issues/1864","id":245643840,"number":1864,"title":"druid-spring-boot-start密码加密问题","user":{"login":"yangm1203","id":818013,"avatar_url":"https://avatars0.githubusercontent.com/u/818013?v=4","gravatar_id":"","url":"https://api.github.com/users/yangm1203","html_url":"https://github.com/yangm1203","followers_url":"https://api.github.com/users/yangm1203/followers","following_url":"https://api.github.com/users/yangm1203/following{/other_user}","gists_url":"https://api.github.com/users/yangm1203/gists{/gist_id}","starred_url":"https://api.github.com/users/yangm1203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangm1203/subscriptions","organizations_url":"https://api.github.com/users/yangm1203/orgs","repos_url":"https://api.github.com/users/yangm1203/repos","events_url":"https://api.github.com/users/yangm1203/events{/privacy}","received_events_url":"https://api.github.com/users/yangm1203/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-26T08:26:34Z","updated_at":"2017-07-27T08:07:34Z","closed_at":null,"body":"java -jar druid-1.1.2.jar com.alibaba.druid.filter.config.ConfigTools  密码\r\n生成privateKey、publicKey、password\r\n配置1\r\n> publicKey: xxxxxxxx\r\nspring:\r\n  datasource:\r\n    url: jdbc:mysql://xxxxx:3306/xxxxxx?useUnicode=true&characterEncoding=utf-8&useSSL=true\r\n    username: xxxxx\r\n    password: xxxxxxxxx\r\n    druid:\r\n      connection-properties: config.decrypt=true;config.decrypt.key=${privateKey};\r\n\r\n会报数据库连接错误，密码不对。\r\n`java.sql.SQLException: Access denied for user 'xxxxx'@'xxxxxxxx' (using password: YES)`\r\n\r\n配置2\r\n> publicKey: xxxxxxxx\r\nspring:\r\n  datasource:\r\n    url: jdbc:mysql://xxxxx:3306/xxxxxx?useUnicode=true&characterEncoding=utf-8&useSSL=true\r\n    username: xxxxx\r\n    password: xxxxxxxxx\r\n    druid:\r\n      connection-properties: config.decrypt=true;\r\n连接成功。但是hibernate报错：\r\n`[2017-07-26 16:19:38.896] [WARN] [17416] [            restartedMain] --- [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:132)] : HHH000342: Could not obtain connection to query metadata : Failed to decrypt.`\r\n\r\n\r\n如果我单纯用druid没问题，用了start就会出错，是不是我哪里没配置对？"},"comment":{"url":"https://api.github.com/repos/alibaba/druid/issues/comments/318290437","html_url":"https://github.com/alibaba/druid/issues/1864#issuecomment-318290437","issue_url":"https://api.github.com/repos/alibaba/druid/issues/1864","id":318290437,"user":{"login":"yangm1203","id":818013,"avatar_url":"https://avatars0.githubusercontent.com/u/818013?v=4","gravatar_id":"","url":"https://api.github.com/users/yangm1203","html_url":"https://github.com/yangm1203","followers_url":"https://api.github.com/users/yangm1203/followers","following_url":"https://api.github.com/users/yangm1203/following{/other_user}","gists_url":"https://api.github.com/users/yangm1203/gists{/gist_id}","starred_url":"https://api.github.com/users/yangm1203/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangm1203/subscriptions","organizations_url":"https://api.github.com/users/yangm1203/orgs","repos_url":"https://api.github.com/users/yangm1203/repos","events_url":"https://api.github.com/users/yangm1203/events{/privacy}","received_events_url":"https://api.github.com/users/yangm1203/received_events","type":"User","site_admin":false},"created_at":"2017-07-27T08:07:34Z","updated_at":"2017-07-27T08:07:34Z","body":"@lihengming \r\n我找到问题了，并不是配置错了，而是待加密密码中不能有上尖号（^）。\r\n例如：\r\n1. `baI@134523esdfgr@sHicaIw^*(U` 坏的\r\n2. `baI134523esdfgrsHicaIwU` 好的\r\n3. `baI@134523esdfgr@sHicaIw*(U` 好的\r\n4. `baI134523esdfgr@sHicaIw^U` 坏的"}}
{"actor":{"display_login":"yangm1203"}}