简体   繁体   中英

How to integrate spring and hibernate with eclipse

I have installed eclipse with integrated glassfish server. now i don't know how to install hibernate and spring into eclipse. any ideas?

Install Apache Maven . Use appfuse to generate a Maven command, create a project and use Maven's

mvn install eclipse:eclipse

to create Eclipse project files and import the project to Eclipse:

File >> Import >> General >> Existing Projects

You don't need to install spring or hibernate in eclipse to use it!

Spring and Hibernate are frameworks which can be used in applications. Eclipse is only the IDE to write the code.

If you want to have support in Eclipse to write Hibernate and Spring Configuration files, you need some eclipse plugins:

  • Eclipse Dali JPA Tools wich are part of Eclipse WTP and part of the Eclipse Java EE package or Hibernate Tools
  • Spring IDE or Spring Tool Suite

In general I recommend to use the Spring Tool Suite , it is based on Eclipse (3.6.1 for STS 2.5.2) Java EE (so it contains the JPA tools) and contains the Spring IDE plugin and some other Spring related tools.

BTW: STS contains a wizzard to create some simple Spring applications with just a few clicks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM