Cov txheej txheem:

Yuav ua li cas txuas hibernate nrog caij nplooj ntoos hlav?
Yuav ua li cas txuas hibernate nrog caij nplooj ntoos hlav?

Video: Yuav ua li cas txuas hibernate nrog caij nplooj ntoos hlav?

Video: Yuav ua li cas txuas hibernate nrog caij nplooj ntoos hlav?
Video: 2023 (Luav xyoo) koj txoj hmoov yuav zoo li cas? Part 1 ( Nas, Nyuj, Tsov) 2024, Hlis ntuj nqeg
Anonim

Cia peb pom dab tsi yog cov kauj ruam yooj yim rau hibernate thiab caij nplooj ntoos hlav kev koom ua ke:

  1. tsim cov lus hauv database Nws yog xaiv tau.
  2. tsim applicationContext. xml cov ntaub ntawv Nws muaj cov ntaub ntawv ntawm DataSource, SessionFactory thiab lwm yam.
  3. tsim tus neeg ua haujlwm.
  4. tsim cov neeg ua haujlwm.
  5. tsim EmployeeDao.
  6. tsim InsertTest.

Tom qab ntawd, peb puas tuaj yeem siv Caij Nplooj Hlav thiab Hibernate ua ke?

Cov ntaub ntawv txhawb lub moj khaum ntawm Caij nplooj ntoos hlav muab kev siv dav dav rau kev sib koom ua ke Hibernate . Nws yog ib qho uas yuav nrhiav tau ntau daim ntawv thov ntau lawm siv Hibernate raws li ORM lub moj khaum hauv Caij nplooj ntoos hlav daim ntawv thov. Qhov tseeb, lawv mus zoo nkauj nrog ib leeg hauv leveraging productivity ntawm tus tsim tawm.

Ib tug kuj nug, yuav ua li cas peb thiaj li tau txais cov ntaub ntawv los ntawm database thaum caij nplooj ntoos hlav siv hibernate?

  1. Teeb ib Sample Database.
  2. Txuas rau Database.
  3. Tsim ib qhov Hibernate-Enabled Project.
  4. Ntxiv Spring Facet rau qhov project.
  5. Reverse Engineer ib Database Table.
  6. Sau Hibernate-Spring Code.
  7. Tsim lub Caij Nplooj Ntoos Hlav raws li PersistenceLayer.
  8. Tsim cov ntaub ntawv Source Spring Bean.

Tib neeg kuj nug, dab tsi yog caij nplooj ntoos hlav hibernate?

Cov Caij nplooj ntoos hlav thiab Hibernate yog ib daim ntawv thov lub moj khaum thiab inversion ntawm tswj lub thawv rau Java platform. Lub hauv paus ntsiab lus Java nta tuaj yeem siv los ntawm txhua daim ntawv thov Java, tab sis muaj kev txuas ntxiv ntawm kev tsim lub vev xaib rau saum Java EE (Enterprise Edition) platform.

Lub caij nplooj ntoos hlav LocalSessionFactoryBean yog dab tsi?

Caij nplooj ntoos hlav muab cov LocalSessionFactoryBean chav kawm ua lub Hoobkas rau SessionFactory khoom. Cov LocalSessionFactoryBean Cov khoom raug teeb tsa raws li taum hauv IoC thawv, nrog rau ib lub zos JDBC DataSource los yog sib koom DataSource los ntawm JNDI.

Pom zoo: