26th day dormant hibernate meets spring warm Yang-spring MVC integration Hibernate use (i)

Source: Internet
Author: User

June 7. Clear. " Red purple has become dust, cuckoo sound in the Shiring."

The road of Mulberry hemp is endless. The beginning is known as the Taiping people.

Hibernate and Spring eclectic meet, not only the beans and beans between the lightning-like collision, but also between XML and XML in the ping water gathering.

Two singular architectures, hand-lakes, not only shape the thrill of dependency injection. Also let the java EE leap Red half of the earth.

The following example, using Springmvc (V2.5.6) and Hibernate (V3.6.10), is the basic knowledge you need to see the pre-session sessions on Springmvc and Hibernate.

Perform the post:

because spring and hibernate are at different levels, spring is concerned with the combination of business logic and Spring provides a powerful management capability. And hibernate is finished with or mapping. Enables developers to deal directly with objects without having to worry about SQL statements.

It's just the right thing to give hibernate the mapping object to spring to manage.

from the example of the previous hibernate, you can see that The operation of persistent data is completed by the session, the only similarity between the session and the Web-httpsession is that the name is a bit like the other, no matter what the other place.

   spring and Hibernate:

       Hibernate sessionfactory, similar to DataSource in JDBC. Is the source of data access, spring first grabbed sessionfactory this faucet. Talent has a trickle of clear spring gush, spring provides integrated functionality for Hibernate sessionfactory is a key point.

Not to be continued ...

26th day dormant hibernate meets spring warm Yang-spring MVC integration Hibernate use (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.