Intellij Idea 用Maven 建立Hibernate 項目

來源:互聯網
上載者:User

標籤:檔案夾   pom.xml   com   png   文章   下載   頁面   http   方法   

第一步:建立maven項目

2.

3.

4.第三步儲存之後進行下一步

 

 到此點擊finish maven項目建立成功,點擊完成後會進行一系列jar包的下載 

maven 倉庫的預設儲存位置

 

第二步:串連資料庫 我用的是mysql

 

接下來點擊綠色加號 選擇Data Source  選擇自己的資料庫 我用的是mysql

 

 

到第五步的時候 點擊 跳轉頁面

上面的測試成功後會彈出一下的頁面

 

三,匯入hibernate的包在pom.xml

  <dependency>      <groupId>org.hibernate</groupId>      <artifactId>hibernate-core</artifactId>      <version>5.2.9.Final</version>    </dependency>

<dependency>      <groupId>mysql</groupId>      <artifactId>mysql-connector-java</artifactId>      <version>5.1.39</version>    </dependency>


接著建立一個檔案夾 java 別忘了把檔案夾變成sources檔案夾 不然沒辦法寫java檔案 方法可以參考我的另一篇文章

接下來右鍵點擊選擇項目 

 

 

 

 

  

 

Intellij Idea 用Maven 建立Hibernate 項目

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.