2016-01-23 71 views
1

彈簧袋鼠不能連接到MySQL 當我執行命令數據庫反向工程--schema測試然後--package它給錯誤:如何將mysql連接到spring roo?

enter image description here

:錯誤的

Could not initialize class com.mysql.jdbc.Connection...

圖片

+0

發佈您的代碼片段 – phoenix

+0

請顯示您的配置,尤其是數據庫連接配置。 –

回答

1

您需要兩兩件事:在項目

  1. 配置連接信息中的src/main /資源/ META-INF/spring/database.properties文件。 Spring Roo使用它來連接數據庫。
  2. 使通過的Spring Roo OSGi的ENVIRON安裝它訪問的JDBC驅動程序(參見manual section about it

祝你好運!