Video: Lub caij nplooj ntoos hlav khau raj Devtools siv rau dab tsi?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
caij nplooj ntoos hlav - khau raj - devtools module suav nrog ib qho embedded LiveReload server uas yog siv txhawm rau 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.
Tom qab ntawd, lub caij nplooj ntoos hlav dev yog dab tsi?
Tus tsim tawm cuab yeej . Caij nplooj ntoos hlav Boot suav nrog ib txheej ntxiv ntawm cuab yeej uas tuaj yeem ua rau daim ntawv thov txhim kho kev paub me ntsis ntxiv qab ntxiag. Cov caij nplooj ntoos hlav -boot- devtools module tuaj yeem suav nrog hauv txhua qhov haujlwm los muab kev txhim kho ntxiv-lub sijhawm nta.
Tom qab ntawd, lo lus nug yog, @EnableAutoConfiguration yog dab tsi? @ EnableAutoConfiguration annotation auto-configures cov taum uas muaj nyob rau hauv classpath. Lub pob ntawm chav kawm uas tau sau tseg nrog @ EnableAutoConfiguration muaj qhov tseem ceeb tshwj xeeb thiab feem ntau siv los ua 'default'. Piv txwv li, nws yuav raug siv thaum luam theej duab rau @Entity chav kawm.
Tsuas yog li ntawd, @configuration yog dab tsi hauv lub caij nplooj ntoos hlav khau?
Caij nplooj ntoos hlav @ Kev teeb tsa annotation pab nyob rau hauv Caij nplooj ntoos hlav annotation raws li kev teeb tsa . @ Kev teeb tsa annotation qhia tias ib chav kawm tshaj tawm ib los yog ntau tshaj @Bean txoj kev thiab tej zaum yuav ua tiav los ntawm cov Caij nplooj ntoos hlav thawv los tsim taum txhais thiab kev thov kev pab rau cov taum ntawm runtime.
SpringApplication khiav () ua dab tsi?
Caij nplooj ntoos hlav khau raj SpringApplication chav kawm yog siv los bootstrap thiab tso tawm a Daim ntawv thov caij nplooj ntoos hlav los ntawm Java lub ntsiab txoj kev. Cov chav kawm no cia li tsim ApplicationContext los ntawm classpath, luam theej duab cov chav kawm configuration thiab tso daim ntawv thov.
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)
Kev siv @value annotation nyob rau lub caij nplooj ntoos hlav yog dab tsi?
Spring @PropertySource annotations yog tsuas yog siv los nyeem los ntawm cov ntaub ntawv khoom siv Spring's Environment interface. Cov lus piav qhia no yog nyob rau hauv kev xyaum, muab tso rau ntawm @Configuration chav kawm. Caij nplooj ntoos hlav @Value annotation tuaj yeem siv los qhia cov lus qhia ntawm daim teb lossis txoj hauv kev. Cov ntaub ntawv siv feem ntau yog qhia cov cuab yeej los ntawm a
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 caij nplooj ntoos hlav khau raj yog dab tsi?
1. Taw qhia. Lub Caij Nplooj Ntoos Hlav muab API thiab kev siv rau kev tswj hwm tus neeg siv cov ntaub ntawv sib tham thaum tseem ua rau nws tsis tseem ceeb los txhawb kev sib koom ua ke yam tsis tau raug khi rau hauv daim ntawv thov ntim cov tshuaj tshwj xeeb
@RequestParam yog dab tsi hauv khau raj caij nplooj ntoos hlav?
Software Hom: Daim ntawv thov txheej txheem