SpringBoot으로 웹 출시까지 #4

springboot logo

4. thymeleaf를 이용해 레이아웃 만들기

1 myhome 만들기

https://start.spring.io/

 

project : maven

springboot :  최대한 낮은 버전 / SNAPSHOT X로 선택

group : godcoder

artifact, name : myhome

java: 8

dependencies : Thymeleaf / Spring Web / Spring Boot DevTools / Lombok

2 IntelliJ와 git 연동하기

https://github.com/

깃허브 계정이 없으신분들은 회원가입을 진행합니다.

그 뒤 강의 내용대로 진행하시면 됩니다.

저는 이번 클론 코딩을 진행하는 모든 코드를 한 번에 관리하기 위해 강의와 다르게 연동하였습니다.

git repository 생성 및 로컬 폴더 연결

을 누르시면 모든 프로젝트를 하나의 리포지토리로 관리 하실 수 있습니다.

3 bootstrap 적용

부트스트랩 스타터 탬플릿 적용

https://getbootstrap.kr/docs/5.0/getting-started/introduction/

– 강의 시점과 시간이 달라 버전이 업그레이드 되었습니다.

    코드가 달라지고, 명령어가 수정되었습니다.

    최대한 유사한 코드를 사용해서 작성했습니다.

<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- Optional JavaScript; choose one of the two! -->

    <!-- Option 1: Bootstrap Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

    <!-- Option 2: Separate Popper and Bootstrap JS -->
    <!--
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
    -->
  </body>
</html>

Visual Studio Code 연결

컴퓨터에 자동 설치된 비주얼스튜디오를 실행시켜 프로젝트 파일(myhome – main – resources)을 열어줍니다.

template 폴더 아래 “index.html” 파일을 만들고 복사한 내용을 붙여넣습니다.

<html lang=“en”> -> <html>으로 수정합니다.

[intelliJ] HomeController 만들기

myhome 아래 “controller” 폴더를 생성하고,  “HomeController” 클래스를 작성합니다.

package com.godcoder.myhome.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class HomeController {
@GetMapping
public String index(){
return "index";
}
}

[VSCode]starter-template.css 작성

myhome – src – main – resources – static 아래 “starter-template.css” 파일을 생성합니다.

body {
padding-top: 5rem;
}
.starter-template {
padding: 3rem 1.5rem;
text-align: center;
}

“SpringBoot으로 웹 출시까지 #4”의 70,843개의 댓글

  1. The realm of internet entertainment has witnessed a huge surge in interest within Southeast Asia, and amidst the top titles grabbing player attention is the famous plinko game [url=https://plinko-87.onrender.com]plinko game online[/url] . If you are looking for an enjoyable path to verify your luck, the platform at plinko-87.onrender.com offers a seamless experience customized for people who love rapid activity and instant prizes. For gamers seeking a high-quality plinko casino game, this webpage supplies a secure layout that brings the retro arcade-style excitement directly to your device.

    Many players in the territory are currently exploring plinko malaysia as a novel way to enjoy play. The charm of this release exists in its ease. By casting balls through a bumpy pyramid, gamers try to land their tokens in high-value slots. Assuming you are engaging for entertainment or pursuing a plinko game online real money encounter, the rules stay straightforward to grasp yet extremely captivating. The online variant accessible online refines the traditional structure, securing smooth speed and fair data for every user.

    Picking the correct plinko casino is necessary for a safe and fun adventure. By accessing the portal, you can uncover why the plinko online game has become a mainstay for relaxed gamers and pro rollers too. For those based in the region, locating a venue that supports plinko malaysia real money features is a common objective. This site emphasizes customer engagement, making it a excellent place to experience a high-class plinko online session from the comfort of your house.

    As you explore this plinko game online, recall to act carefully and enjoy the anticipation that arrives with every turn. The mix of planning and fortune makes it a standout option in the present marketplace. If you are ready to start, head over to the portal and confirm if you can hit the prize you have been anticipating. With its user-friendly layout and swift session, it remains one of the top options to connect with this legendary game presently.

  2. Этот документ охватывает важные аспекты медицинской науки, сосредотачиваясь на ключевых вопросах, касающихся здоровья населения. Мы рассматриваем свежие исследования, клинические рекомендации и лучшие практики, которые помогут улучшить качество лечения и профилактики заболеваний. Читатели получат возможность углубиться в различные медицинские дисциплины.
    Доступ к полной версии – [url=https://sanekua.ru/kodirovanie-ot-alkogolizma-put-k-novoy-zhizni/]кодирование от алкоголя[/url]

  3. goldenlion-thulk

    Whenever hunting for a top-tier gambling site, enthusiasts are increasingly turning their interest to the website found at goldenlion-4.pages.dev [url=https://goldenlion-4.pages.dev]goldenlion casino[/url] . This virtual centre offers a complete experience for individuals who appreciate high-quality amusement. If you have been searching for a reliable golden lion casino, this domain serves as a elegant portal to a wide selection of slots, table games, and immersive features created to keep participants interested.

    Numerous fans who peruse a detailed goldenlion casino review will notice that the platform emphasizes supplying a flawless user interface. Whether you are opening the site via desktop or smartphone, the goldenlion experience is designed to facilitate rapid loading times and simple navigation. By choosing to play at this casino golden lion, you secure admittance to a selected variety of titles that accommodate both novices and veteran experts.

    The renown of the goldenlion casino online space keeps on grow as more gamers uncover the benefits of this particular link. Performing your personal goldenlion review uncovers that the portal emphasizes user protection and a wide library of casino alternatives. It is no wonder that the golden lion online group is widening fast, with players commending the stability and design of the interface.

    For people interested about the credibility of the platform, the casino goldenlion name has grown associated with a dedicated betting atmosphere. The golden lion platform is developed to provide fun, integrating sharp visuals with a dependable technical structure. If you are ready to explore what the goldenlion casino has to provide, the webpage contains all that is required for a up-to-date gambling experience. As you navigate the functions accessible at this location, you will understand why numerous deem this the leading option for digital betting players in the UK. By visiting the portal, you can review the entire array of games provided and decide for yourself if this is the ideal space for your betting requirements. Enjoy the thrill of the action at this established hub today.

  4. chickenroad-emIgo

    een belangrijke virtuele speelomgeving toestaan spelers het mogelijkheid om uitgebreide casinospellen en online spellen te ervaren zonder investering te inzetten [url=https://chickenroad-nl-17.vercel.app]Chicken Road Demo Legaal[/url] . De omgeving Chicken Road Demo NL-test.vercel.app staat een onder deze websites waarbij je de demo-edities kunt proberen. Of je eens nieuw wordt binnen de wereldje van internetcasino’s of gewoon jouw geliefde spellen zijn bekijken, een demo-versie biedt een uitstekende manier om gewoon te worden met het spelervaring en de eigenschappen van de games.

    Een Chicken Road Demo Review demonstreert regelmatig op spelers waarde toekennen aan de verscheidenheid aan gokspellen wat toegankelijk blijken. Bij deze testomgeving kunt de wijd assortiment aan slots, zoals thematische en klassieke games, bekijken. Dit wordt bijzonder praktisch voor wie de Chicken Road Demo Slot moet spelen zonder onmiddellijk te gokken. Het platform verlenen een realistische ervaring, door je kunt oefenen met plannen en de bediening van de gokspellen voordat je werkelijk investering investeert.

    Veel spelers onderzoeken zichzelf over: Is Chicken Road Demo betrouwbaar? Ondanks de testomgeving zelf geen werkelijke beloningen toestaan, blijkt de belangrijk om om weten wat de casinospellen meestal afkomstig zijn van uitmuntende softwareleveranciers. Dit betekent wat de spelervaring en de standaard van de games hoog zijn. Toch wordt het altijd verstandig om te controleren of de speelomgeving zelf veilig en betrouwbaar is, bijzonder als je later van plan hebt om op de echte Chicken Road Demo Casino-platform te spelen.

    Voor casinogangers binnen Nederlandse is Chicken Road Demo NL een aantrekkelijke kans, want de netwerk meestal Nederlandse mogelijkheden en assistentie toestaan. Deze Chicken Road Demo Test in Nederland kan versterken om om bepalen of de site geschikt blijkt voor uw eisen. Ook je eens op zoek staat naar een Chicken Road Demo Betrouwbare of eenvoudig een vermaakelijk passatie, deze testomgeving biedt een goede start.

    Deze wordt ook belangrijk om te te wat een Chicken Road Demo Legaal is, zolang je alleen de proefversies gebruikt. Echte gokken op casino’s worden in Nederlandse onderworpen aan wetten en regels, daarom indien je van bedoeling zit om aan daadwerkelijk bedrag te spelen, moet je altijd bij een geautoriseerde en gecertificeerde omgeving proberen. De speelomgeving wordt daarom bijzonder bedoeld voor leringsdoeleinden en plezier.

    Al met al wordt Chicken Road Demo de nuttige tool voor iedereen wat meer moet weten over online slotspellen en digitale spellen. Of je eens op zoek zit naar een Chicken Road Demo Beoordelingen of eenvoudig wilt bekijken van de games, de test biedt een veilige en leuke optie om om begin.

  5. В данной статье мы акцентируем внимание на важности поддержки в процессе выздоровления. Мы обсудим, как друзья, семья и профессионалы могут помочь тем, кто сталкивается с зависимостями. Читатели получат практические советы, как поддерживать близких на пути к новой жизни.
    Что скрывают от вас? – [url=https://housemastery.ru/pages/srochno-vrach-narkolog-na-dom/]нарколог на дом самара цены[/url]

  6. Эта последовательность действий обеспечивает безопасное прекращение запоя и предотвращает развитие синдрома отмены.
    Детальнее – [url=https://vyvod-iz-zapoya-v-rostove-na-donu16.ru/]срочный вывод из запоя в ростове-на-дону[/url]

  7. Нарколог на дом в Челябинске — это услуга, которая позволяет получить профессиональную медицинскую помощь при алкогольной или наркотической интоксикации без необходимости посещения клиники. Такой формат особенно востребован в случаях, когда пациент не может самостоятельно прибыть в медицинское учреждение или нуждается в конфиденциальной помощи. Врач-нарколог выезжает по указанному адресу, проводит осмотр, оценивает состояние и подбирает оптимальную терапию. Квалифицированное вмешательство помогает избежать осложнений и стабилизировать состояние уже в течение первых часов после прибытия специалиста.
    Исследовать вопрос подробнее – https://narkolog-na-dom-v-chelyabinske16.ru/narkolog-na-dom-v-chelyabinske-vyvod-iz-zapoya

  8. chickenroad-Stody

    Online Race Test is een belangrijke interactieve wereld voor het grootse slotspel Chicken Road, dat eerst afkomstig is uit een exotische bestemming. De website [url=https://chickenroad-nl-18.onrender.com]Chicken Road Demo Legaal[/url] biedt toeschouwers de toegang om het avontuur kostenloos te ervaren zonder geld te vermijden.

    Dit is vooral belangrijk voor iedereen nieuw is met De Race Test of iemand simpelweg de eisen en het mechanisme willen leren kennen. Met een demo kun je de diverse niveaus, de tactieken en de proeven van het avontuur ervaren zonder monetaal nadel.

    Een De Uitdaging Test Beoordeling kan waardevol zijn voor gamers die op zoek zijn naar details over de kwaliteit en werkzaamheid van de platform. Sinds kort gebruikers zijn geïnteresseerd in of De Challenge Proef toegestaan is en of ze er veilig mee kunnen deelnemen. Hoewel De Uitdaging zelf een legale editie van een gaming is, is het verstandig om te weten dat demo’s meestal worden aangeboden door virtuele speelplaatsen die volgens Hollandse wetten zijn onderworpen.

    Het is echter cruciaal om te checken of de omgeving compliant is aan de Nederlandse spelregels en of ze een goedgekeurde toestemming hebben.

    Voor iemand op zoek is naar De Challenge Simulatie Review in de Benelux, is het goed om te verstaan dat de testomgeving meestal wordt gebruikt om de interactie te bekijken voordat men werkelijk vermogen gaat zetten. Veel gamers vragen zich af of De Uitdaging Test reputabel is en of ze er vertrouwen in kunnen zetten. Ondanks simulaties geen echte daadwerkelijke prijzen verlenen, kunnen ze wel een diepgaand inzicht geven in hoe het avontuur verloopt en of het wat voor jou is.

    In de Benelux is De Challenge Proef Nederlandse een gezochte zoekopdracht, uitermate omdat twee derde spelers voorkeur een goedgekeurde en betrouwbare wereld willen. Het is verstandig om te opletten op de reputatie van het gokhuis dat de test geeft, aangezien niet alle sites even reputabel zijn. Een goede Chicken Road Demo Beoordeling kan versterken bij het maken van een verstandig beslissing.

    Voor iedereen onbekend is met De Race Test Slot, is het logisch om eerst de demo te ervaren voordat men daadwerkelijk vermogen gaat staken. Dit verstrekkt een beter inzicht van de opties, de benaderingen en de proeven die het avontuur met zich meebrengt|met zich meebrengt|in zich draagt. Ook al is De Uitdaging Test Nederlandse regio’s niet hetzelfde aan het daadwerkelijke spel, het kan wel een uitstekende training zijn voor spelers op een later tijdstip echt zich spelen.

    Tot slot is het cruciaal om te benadrukken dat De Uitdaging Proef Casino’s meestal volgens zeer controle zijn onderworpen, maar dat het altijd wijs is om uw informatie te uitvoeren voordat je geld gaat steken. Een goedgekeurde Chicken Road Test Recensie kan hierbij ondersteunen om een doordacht optie te beslissen.

댓글 달기

이메일 주소는 공개되지 않습니다.