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”의 20,464개의 댓글

  1. Основой вывода из запоя является инфузионная терапия, которую часто называют капельницей. Она позволяет быстро снять интоксикацию, восстановить водно-солевой баланс, нормализовать работу сердца, печени и почек, а также уменьшить проявления абстиненции и похмельного синдрома. Врач подбирает состав раствора индивидуально, в зависимости от тяжести состояния пациента и результатов осмотра. Стандартная капельница при запое обычно включает несколько компонентов, каждый из которых выполняет свою задачу. В нашей практике мы применяем только качественные сертифицированные препараты, которые прошли проверку и доказали свою эффективность.
    Ознакомиться с деталями – https://1vyvod-iz-zapoya-moskva15.ru/

  2. Эта информационная публикация освещает широкий спектр тем из мира медицины. Мы предлагаем читателям ясные и понятные объяснения современных заболеваний, методов профилактики и лечения. Информация будет полезна как пациентам, так и медицинским работникам, желающим поддержать уровень своих знаний.
    Хочу знать больше – [url=https://tokzamer.ru/informaciya/vyzov-vracha-narkologa]наркологическая помощь на дому[/url]

  3. Алгоритм на выезде помогает убрать импровизации, а семье — понимать, что будет происходить и по каким признакам мы двигаемся дальше. Он гибкий, но всегда прозрачный: каждый шаг имеет цель, инструмент и критерий успеха.
    Разобраться лучше – [url=https://narkolog-na-dom-stavropol15.ru/]платный нарколог на дом ставрополь[/url]

  4. Provided you are searching for an thrilling method to examine your game wisdom and gaming abilities, the cricket road platform has evolved a popular spot for fans within India [url=https://cricket-road-24.ofazedusafa13.workers.dev]real cricket road game[/url] . This captivating cricket road game merges the excitement of real-time sports elements with an user-friendly layout that regularly ensures players coming back for additional play. Whether you remain a casual participant or a veteran pro, the portal presents a distinctive environment to connect with your beloved sport in a virtual style.

    Many players looking for the cricket road game on the web often remain inquisitive concerning the gaming journey and how to begin. The process is straightforward, beginning with a simple cricket road login. Once you are in the portal, you might explore diverse features that help the cricket road online game shine in a busy industry. It is crucial to remember that when you hunt for the real cricket road game, you should constantly verify you are using the legitimate site to provide a smooth and secure member session.

    One of the most commonly posed topics concerns cricket road game money and how the mechanism operates. Players relish the engaging essence of the platform, which mirrors the intensity of intense games. If you are for the cricket road game original version, do not forget to validate your details using the genuine cricket road game login. This aids in maintaining account integrity and keeps your gaming progression tracked correctly.

    For individuals who perceive this as a type of cricket road casino entertainment, the platform provides a fusion of strategy and randomness that interests many fans. Due to its increasing fame, many players are now versed with the brand as cricketroad. If you stay set to plunge into the play, just go to the site, finish your cricket road login, and begin your journey. As with every digital undertaking featuring digital awards, constantly play responsibly and enjoy the spirited energy that this platform delivers to cricket enthusiasts everywhere.

  5. betandplay-Immicky

    digitale Spielplattform konzentriert sich auf ein zeitgemäßes und intuitives Casino-Erlebnis [url=https://betandplay-casino-32.onrender.com]Bet And Play Erfahrungen[/url] .

    Die Spielseite bietet sich an unter betandplay-casino-32.onrender.com und stellt eine breite Reihe an Casino-Spielen, die sowohl Casinospieler als auch Casino-Neulinge begeistern. Doch man sich auf die Suche nach den besten Casino-Angeboten macht, ist es wert, die Casino-Erfahrungen bei Bet And Play zu analysieren, um bestätigen, dass das Spielportal zuverlässig ist.

    Die Bet And Play Erfahrungen von Spielern sind durchgehend gut, da das Casino eine breite Auswahl an Live-Dealer-Spielen, Glücksspielautomaten und Tischgames verfügt. Besonders werden die Echtzeit-Dealer-Spiele oft gelobt, da sie eine lebensechte Umgebung schaffen und die Interaktion mit qualifizierten Dealern zulassen. Auch die Spielentwickler wie Playtech gewährleisten für topmoderne Spiele mit fairen Spielregeln.

    Ein entscheidender Punkt bei der Beurteilung von Bet Andplay Casino ist die Seriosität des Spielportals. Bet And Play ist genehmigt und arbeitet mit professionellen Zahlungsanbietern gemeinsam, was die Sicherheit der Ein- und Auszahlungen garantiert. Die Website verfügt zudem eine sichere Datensicherung der Informationen, um die Persönlichkeitsrechte der Nutzer zu schützen. Viele Nutzer bezeugen, dass die Transaktionen rasch und ohne weitere Hürden abgewickelt werden, was die Bet And Play Erfahrungen insgesamt positiv beeinflusst.

    Für Glücksspielinteressierte, die auf der Entdeckung nach einem modernen Glücksspielportal sind, ist Bet And Play eine attraktive Wahl. Die Spieler-Feedbacks demonstrieren, dass das Spielportal nicht nur eine vielfältige Spielauswahl stellt, sondern auch auf Nutzerunterstützung und Transparenz Beachtung legt. Wer sich für das Casino entscheidet, kann sich auf ein sicheres und spannendes Casino-Erlebnis verlassen.

    Sowohl man sich für die Spieler-Feedbacks zu Bet And Play oder eine Bet And Play Casino Review prüfen möchte, die Erfahrungen sind grundsätzlich extrem und stärken die Zuverlässigkeit des Anbieters. Wer also auf der Recherche nach einem professionellen Spielportal ist, sollte das Casino absolut in Berücksichtigung ziehen.

  6. В статье по вопросам здоровья мы рассматриваем актуальные проблемы, с которыми сталкивается общество. Обсуждаются заболевания, факторы риска и важные аспекты профилактики. Читатели получат полезные советы о том, как сохранить здоровье и улучшить качество жизни.
    Узнай первым! – [url=https://renobuilder.ru/pages/vyzov-vracha-narkologa-na-dom-spb-telefon/]нарколог на дом спб цены[/url]

  7. Wenn Sie auf der Suche nach einem hochkaratigen Portal fur digitales Glucksspiel ist, sollten Sie sich selbst spinogambino intensiv betrachten [url=https://spino-gambinospiel.de]spinogambino bet[/url] . Das spinogambino casino wusste sich kurzlich einen hervorragenden Namen bei Spielern erarbeitet, die gro?en Fokus legen auf eine vielfaltige Auswahl an Vergnugungsangeboten setzen. Sobald man spino gambino besuchen, wird man sofort von einem intuitiven Interface empfangen, die sowohl auf dem Desktop wie auf mobilen Geraten eine reibungslose Erfahrung bietet.

    Ein herausragender Punkt bleiben definitiv die spinogambino slots. Jene glanzen mittels erstklassiger Optik, innovative Spielmechaniken sowie faire Gewinnquoten hinweg. Egal ob ihr traditionelle Obst-Automaten sowie aktuelle Automatenspiele bevorzugen, in dem Bereich der spino gambino slots sto?t jeder Zocker auf die richtige Wahl. Die Auswahl wird stetig erweitert, sodass Tristesse beim spinogambino casino online spielen ein Fremdwort bleibt.

    Fur viele Nutzer bleibt das Thema um die Seriositat und Seriositat zentral. Ein detaillierter spinogambino casino Testbericht unterstreicht eindrucksvoll, dass der Anbieter stark auf Datenschutz und faire Spielbedingungen achtet. Sobald ihr einen spinogambino Einsatz wagen wollt, konnen Sie sich auf klare Prozesse und einen hilfsbereiten Kundensupport bauen. Gerade fur Nutzer aus dem deutschsprachigen Raum ist das spinogambino casino deutschland ein erstklassiger Treffpunkt, weil die Webseite optimal auf die Bedurfnisse der User ausgelegt ist.

    Der spinogambino Glucksspielanbieter vereint ein spannendes Design mit einer intuitiven Navigation. Wenn ihr euch wahlt fur die Plattform spinogambino entscheidet, profitieren Sie allein von einer riesigen Bandbreite an Spielen, sondern auch von regelma?igen Bonusaktionen, die das Vergnugen zusatzlich steigern. Als Fazit ist zu sagen, dass das spino gambino casino fur alle Anhanger von Spielautomaten eine Top-Adresse ist. Wer Vielfalt begehrt und Wert auf eine vertrauensvolle Spielumgebung legt, ist bei spinogambino perfekt platziert. Prufen Sie eigenstandig von der Gute des Portals und steigen Sie ein in das faszinierende Universum von spino gambino casino, wo Adrenalin und Spielspa? die hochste Prioritat genie?en. Die Verbindung aus exzellentem Support und einem vielfaltigen Angebot an erstklassigen Games lasst das Casino zu einem festen Bestandteil der Glucksspielwelt. [url=https://acroxer.com/bbs/board.php?bo_table=Anatomy_Forum&wr_id=430128]Warum das spinogamb[/url] [url=https://www.ecoviperasmus.eu/blog/fishers-birders-bojo-river-story?page=23554#comment-278492]Weshalb das spinogambino casino die perfekte Adresse fur Freunde virtueller Casino-Action ist.[/url] adfec98

  8. Wspołczesny rynek hazardu online nieustannie się rozwija, oferując użytkownikom coraz nowocześniejsze serwisy do gry oraz grania w gry typu casino [url=https://ivybet-74.lenoreblockmonjfm494.workers.dev]ivybet[/url] . Opcją, ktora zyskuje na popularności wśrod polskich użytkownikow, jest ivybet. Serwis ten oferuje połączenie funkcjonalność platformy bukmacherskiej z bogatą biblioteką gier typu ivy bet casino, zapewniając użytkownikom kompleksowe doświadczenia w jednym miejscu.

    Jeśli chodzi o ivybet polska, użytkownicy zwracają szczegolną uwagę na przejrzysty interfejs oraz intuicyjną nawigację, ktora usprawnia przechodzenie pomiędzy zakładami a automatami. Jako ivybet bukmacher, platforma oferuje szeroki wybor dyscyplin sportowych, od najpopularniejszej piłki nożnej po niszowe sporty elektroniczne, co sprawia, że oferta jest atrakcyjna dla wielu graczy. Z kolei ivybet casino przyciąga użytkownikow rożnorodnością tytułow od renomowanych dostawcow oprogramowania, zapewniając dostęp do klasycznych automatow oraz gier na żywo z prawdziwymi krupierami.

    Szukając informacji w sieci, wielu graczy wpisuje frazę ivybet opinie, aby sprawdzić, co inni użytkownicy myślą o niezawodności serwisu oraz szybkości wypłat. Pozytywne sygnały płynące od społeczności korzystającej z ivybet pl potwierdzają, że strona stawia na bezpieczeństwo i jakość obsługi klienta. Dla osob, ktore preferują obstawianie w rodzimym języku, ivy bet polska stanowi komfortową opcję, usuwające bariery językowe i pozwalające w pełni skupić się na strategii gry.

    Warto pamiętać, że ivy bet to serwis skierowany do osob pełnoletnich, ktore szukają zabawy na wysokim poziomie. Bez względu na to, czy wybierzesz ivy bet casino dla emocji płynących z kręcenia bębnami, czy zdecydujesz się na typowanie wynikow sportowych, warto sprawdzić aktualne promocje i bonusy powitalne, ktore często towarzyszą rejestracji. Podsumowując, platforma ta stanowi interesującą propozycję na polskim rynku, oferując nowoczesne podejście do hazardu online w bezpiecznym środowisku. Każdy fan zakładow znajdzie tu coś dla siebie, korzystając z funkcjonalności dostępnej na wyciągnięcie ręki, niezależnie od urządzenia, z ktorego korzysta.

  9. spinmacho-SWORNE

    This modern betting landscape is evolved rapidly, and users are ever searching for mobile-first experiences which give ease barring compromising on excellence [url=https://spinmacho-login.com/app]spinmacho app download[/url] . The spinmacho app is become a top-tier choice for fans that crave reach these favorite betting titles while traveling. By focusing on user experience and fluid interface, this site guarantees how each round is merely a touch distant. Whether if employing utilizing a cellphone or a pad, the spinmacho casino app is engineered for provide a slick execution which challenges laptop play.

    For players eager to begin, the journey starts with the spinmacho app download. Visiting the main portal lets users for discover the necessary files for trigger the spinmacho apk download. Through choosing to get the apk spinmacho file, users gain quick access for a vast collection of betting, secure banking choices, and dedicated customer help. The spinmacho apk stays tuned for various mobile OS, guaranteeing how just players using older devices might experience HD graphics plus rapid loading times.

    Locating the proper spinmacho download choice is simple. Once users successfully initiated the spin macho download, everyone will speedily realize how intuitive the interface seems. Regarding Droid enthusiasts, the spin macho apk provides a stable portal for a vast library in slots plus table bets. Should you are hunting for the ideal approach for experience these rounds, the spin macho app functions as a sturdy handheld base for all your wagering needs. The spin macho app download is highly recommended towards players who appreciate safety plus speed.

    The spin macho casino app glitters thanks to its unique perks and smooth account management features. By choosing the app spin macho, users be opting for a premium handheld environment tailored for today’s players. Whether anyone refer to it like the casino spinmacho app or simply the spin macho app, the standard stays uniform. Get the favorite version today plus test the path of mobile fun directly from your handset.

댓글 달기

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