Cov txheej txheem:
Video: Lub caij nplooj ntoos hlav khau raj yog dab tsi?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
1. Taw qhia. Caij nplooj ntoos hlav muab API thiab kev siv rau kev tswj tus neeg siv kev sib tham cov ntaub ntawv thaum tseem ua rau nws tsis tseem ceeb los txhawb pawg kev sib tham tsis tau khi rau hauv daim ntawv thov ntim cov tshuaj tshwj xeeb.
Ib yam li ntawd, kuv yuav tswj cov kev sib ntsib hauv lub caij nplooj ntoos hlav li cas?
Cov kauj ruam los siv Spring Boot Session Management, uas yuav muaj nyob rau hauv no nyeem
- Tsim Spring Boot project los ntawm Spring Initializer.
- Ntxiv Spring Session jdbc nyob rau hauv pom.xml.
- Ntxiv caij nplooj ntoos hlav jdbc cov khoom hauv application.properties.
- Tsim cov ntsiab lus so kawg kom txuag, rhuav tshem / tsis raug cai.
HttpServletRequest caij nplooj ntoos hlav khau raj yog dab tsi? Taw qhia. Nyob rau hauv no nyeem, peb mam li kawm yuav ua li cas nyeem lub cev ntawm lub HttpServletRequest siv ntau zaus Caij nplooj ntoos hlav . HttpServletRequest yog ib qho interface uas nthuav tawm getInputStream() txoj kev nyeem lub cev. Los ntawm lub neej ntawd, cov ntaub ntawv los ntawm InputStream no tuaj yeem nyeem ib zaug xwb.
Hauv qhov no, lub caij nplooj ntoo hlav ua haujlwm li cas?
Txheej txheem cej luam. Caij nplooj ntoos hlav muaj lub hom phiaj yooj yim ntawm kev pub dawb kev sib tham kev tswj hwm los ntawm cov kev txwv ntawm HTTP kev sib tham khaws cia rau hauv lub server. Txoj kev daws teeb meem ua kom yooj yim rau kev sib koom kev sib tham cov ntaub ntawv ntawm cov kev pabcuam hauv huab yam tsis tau khi rau ib lub thawv (piv txwv li Tomcat).
Puas yog Spring Security siv sijhawm?
Los ntawm lub neej ntawd, Caij nplooj ntoos hlav Security yuav tsim ib kev sib tham thaum nws xav tau ib qho - qhov no yog "yog xav tau". Rau ib daim ntawv thov tsis muaj xeev ntxiv, qhov kev xaiv "yeej tsis" yuav ua kom ntseeg tau tias Caij nplooj ntoos hlav Security nws tus kheej yuav tsis tsim ib qho kev sib tham ; txawm li cas los xij, yog tias daim ntawv thov tsim ib qho, ces Caij nplooj ntoos hlav Security yuav ua siv ntawm nws.
Pom zoo:
Kuv yuav ua li cas pab SSL thaum caij nplooj ntoos hlav khau raj?
Kauj ruam 1: Tau txais daim ntawv pov thawj SSL. Yog tias koj xav siv SSL thiab ua haujlwm rau koj daim ntawv thov Spring Boot hla HTTPS koj yuav tsum tau txais daim ntawv pov thawj. Kauj ruam 2: Qhib HTTPS hauv Spring Boot. Los ntawm lub neej ntawd koj lub caij nplooj ntoos hlav khau raj embedded Tomcat thawv yuav muaj HTTP ntawm chaw nres nkoj 8080 enabled. Kauj ruam 3: Redirect HTTP rau HTTPS (yeem)
Daim ntawv thov caij nplooj ntoos hlav khau raj siv li cas?
Cov ntawv thov caij nplooj ntoos hlav khau raj tau yooj yim tau ntim rau hauv JAR cov ntaub ntawv thiab xa mus ua cov ntawv thov ib leeg. Qhov no yog ua los ntawm lub caij nplooj ntoos hlav-boot-maven-plugin. Lub plugin yog cia li ntxiv rau pom. xml ib zaug lub caij nplooj ntoos hlav project yog tsim los ntawm Spring Initializr li Maven project
Lub ntsiab lus configuration nyob rau lub caij nplooj ntoos hlav yog dab tsi?
Lub Caij Nplooj Ntoos Zeeg yog dab tsi? Caij nplooj ntoos hlav ntsiab lus tseem hu ua Spring IoC ntim, uas yog lub luag hauj lwm rau instantiating, configuring, thiab assembling taum los ntawm kev nyeem configuration metadata los ntawm XML, Java annotations, thiab / los yog Java code nyob rau hauv cov ntaub ntawv configuration
Lub caij nplooj ntoos hlav khau raj Devtools siv rau dab tsi?
Caij nplooj ntoos hlav-khau raj-devtools module suav nrog ib qho embedded LiveReload neeg rau zaub mov uas yog siv los ua kom lub browser refresh thaum muaj kev hloov pauv. Txhawm rau ua qhov no tshwm sim hauv qhov browser peb yuav tsum nruab LiveReload plugin ib qho kev siv yog Chaw Taws Teeb Live Reload rau Chrome
@RequestParam yog dab tsi hauv khau raj caij nplooj ntoos hlav?
Software Hom: Daim ntawv thov txheej txheem