Video: Daim ntawv thov caij nplooj ntoos hlav khau raj siv li cas?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
Spring Boot applications tuaj yeem yooj yim ntim rau hauv JAR cov ntaub ntawv thiab xa mus ua standalone daim ntawv thov . Qhov no yog ua los ntawm cov caij nplooj ntoos hlav - khau raj -maven-plugin. Lub plugin yog cia li ntxiv rau pom. xml ib Caij nplooj ntoos hlav qhov project yog tsim los ntawm Caij nplooj ntoos hlav Initializr ua ib txoj haujlwm Maven.
Ib yam li ntawd, koj tuaj yeem nug, peb puas tuaj yeem siv lub caij nplooj ntoos hlav khau raj hauv WebSphere?
Feem ntau muaj ob txoj hauv kev los teeb tsa & deploy Spring Boot application hauv IBM Liberty Profile Daim ntawv thov Server. Nov yog txoj hauv kev peb yuav sim nrog. Ib zaug peb Spring Boot Application ua haujlwm hauv IBM Liberty Profile, peb yuav ces xa mus tus daim ntawv thov hauv IBM WebSphere Application Server 8.5.
Ib yam li ntawd, lub caij nplooj ntoos hlav khau raj puas xav tau Application Server? Hauv kuv txoj kev xav caij nplooj ntoos hlav khau raj muaj peev xwm khiav java web daim ntawv thov nyob ib leeg. Nws hais tias nws muaj nws tus kheej servlet thawv thiab siv tau JNDI nws tus kheej. Kuv tau tsim ib daim ntawv ua tsov rog ua ntej ( caij nplooj ntoos hlav -mvc, kev ruaj ntseg, qib tsim), tab sis Caij nplooj ntoos hlav khau raj sib sau cov ntaub ntawv lub thawv thiab nws khiav ntawm txhua lub tshuab uas muaj JVM.
Ntawm no, peb puas tuaj yeem siv lub caij nplooj ntoos hlav khau raj hauv Tomcat?
Muab tso rau a Spring Boot Application rau hauv Tomcat . Deploying applications nyuaj. Feem ntau koj xav tau console nkag mus rau lub server los ntawm qhov twg koj rub tus lej tshiab thiab tom qab ntawd manually instantiate rau hauv koj lub thawv.
Lub caij nplooj ntoos hlav khau raj puas zoo rau kev tsim khoom?
Caij nplooj ntoos hlav khau raj aim yog ntau lawm npaj txhij, los ntawm lub neej ntawd. Qhov no txhais tau tias nws nkoj nrog pab tau defaults tawm ntawm lub thawv uas tej zaum yuav overriden, yog tias tsim nyog. Los ntawm lub neej ntawd, Caij nplooj ntoos hlav khau raj muab ib qho embedded Apache Tomcat tsim.
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)
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
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
Yuav ua li cas koj ua lub caij nplooj ntoos hlav khau?
Hauv qab no yog cov kauj ruam los tsim ib qho yooj yim Spring Boot Project. Kauj ruam 1: Qhib lub caij nplooj ntoos hlav initializr https://start.spring.io. Kauj Ruam 2: Muab cov pab pawg thiab cov khoom kos npe. Kauj ruam 3: Tam sim no nyem rau ntawm Tsim khawm. Kauj ruam 4: Extract cov ntaub ntawv RAR. Kauj ruam 5: Import lub nplaub tshev. SpringBootExampleApplication.java. pom xml