Spring MVC Java yog dab tsi?
Spring MVC Java yog dab tsi?

Video: Spring MVC Java yog dab tsi?

Video: Spring MVC Java yog dab tsi?
Video: Spring Boot Form Handling with Spring Form tags and JSP 2024, Kaum ib hlis
Anonim

A Spring MVC yog a Java framework uas yog siv los tsim web applications. Nws ua raws li Model-View-Controller tsim qauv. Nws siv tag nrho cov yam ntxwv ntawm ib qho tseem ceeb lub caij nplooj ntoo hlav zoo li Inversion of Control, Dependency Txhaj.

Ib sab ntawm no, dab tsi yog qhov ntws ntawm Spring MVC?

Caij nplooj ntoos hlav MVC Flow Daim duab. MVC yog tus qauv tsim uas muab cov kev daws teeb meem rau txheej ib daim ntawv thov los ntawm kev sib cais ua lag luam (Model), Kev nthuav qhia (Saib) thiab Tswj Ntws (Controller).

Ib tug kuj yuav nug, MVC yog dab tsi hauv Java? MVC Pattern stands rau Model-View-Controller Pattern. Cov qauv no yog siv los cais daim ntawv thov kev txhawj xeeb. Model - Model sawv cev rau ib yam khoom los yog JAVA POJO nqa cov ntaub ntawv. Nws kuj tseem tuaj yeem muaj logic los hloov kho tus tswj yog tias nws cov ntaub ntawv hloov pauv.

Tom qab ntawd, ib tug kuj yuav nug, dab tsi yog lub caij nplooj ntoos hlav hauv Java?

Cov Caij nplooj ntoos hlav Framework yog ib daim ntawv thov lub moj khaum thiab inversion ntawm tswj thawv rau lub Java platform. Cov lub moj khaum cov yam ntxwv tseem ceeb tuaj yeem siv los ntawm ib qho twg Java daim ntawv thov, tab sis muaj kev txuas ntxiv rau kev tsim cov ntawv thov web saum toj kawg nkaus Java EE (Enterprise Edition) platform. Cov Caij nplooj ntoos hlav Framework yog qhib qhov chaw.

Puas yog lub caij nplooj ntoos hlav khau raj MVC?

Spring MVC yog qhov ua tiav HTTP taw qhia MVC lub moj khaum tswj los ntawm lub Caij nplooj ntoos hlav Lub moj khaum thiab raws li hauv Servlets. Caij nplooj ntoos hlav khau raj yog ib qho khoom siv rau kev teeb tsa cov ntawv thov sai, muab ib qho tawm ntawm lub thawv teeb tsa txhawm rau tsim Caij nplooj ntoos hlav - kev siv zog.

Pom zoo: