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”의 75,348개의 댓글

  1. Αν ψάχνετε για μια κορυφαία εμπειρία στον κόσμο του online gaming, το leon casino αποτελεί έναν από τους πιο ανερχόμενους προορισμούς για τους παίκτες στην Ελλάδα [url=https://leon-5.onrender.com]leon casino κριτικες[/url] . Η πλατφόρμα leon συνδυάζει την ποικιλία των παιχνιδιών με ένα περιβάλλον υψηλής προστασίας, κερδίζοντας διαρκώς την εμπιστοσύνη του κοινού. Όταν δοκιμάζετε το leon bet, θα διαπιστώσετε ότι η πλατφόρμα προσφέρει μια ολοκληρωμένη λύση τόσο για τους λάτρεις των slots όσο και για όσους προτιμούν τα κλασικά επιτραπέζια παιχνίδια.

    Το leon bet casino διακρίνεται για την ευχρηστία του και την άμεση ανταπόκριση στις ανάγκες των μελών του. Αναζητώντας leon casino κριτικες στο διαδίκτυο, θα παρατηρήσετε ότι οι παίκτες εκτιμούν ιδιαίτερα τη γρήγορη διαδικασία για το leon casino login, η οποία προσφέρει την άμεση πρόσβαση στο παιχνίδι χωρίς περιττές καθυστερήσεις. Η εμπειρία που προσφέρει το casino leon είναι σχεδιασμένη ώστε να καλύπτει κάθε γούστο, προσφέροντας τίτλους από τους κορυφαίους παρόχους λογισμικού της αγοράς.

    Για τους Έλληνες παίκτες, το leon casino gr είναι μια εξαιρετική επιλογή, καθώς η πλατφόρμα έχει προσαρμοστεί στις απαιτήσεις της τοπικής αγοράς, παρέχοντας υποστήριξη και λειτουργικότητα υψηλού επιπέδου. Το leon casino ελλαδα προσφέρει ασφαλείς μεθόδους συναλλαγών και μια μεγάλη γκάμα από προσφορές που ανανεώνονται τακτικά. Είτε είστε παίκτης με εμπειρία είτε τώρα ξεκινάτε την περιήγησή σας, το leoncasino σας καλωσορίζει σε έναν κόσμο γεμάτο διασκέδαση.

    Η αξιοπιστία είναι το θεμέλιο πάνω στο οποίο βασίζεται κάθε δραστηριότητα στο leon. Με μια σύγχρονη και κομψή διεπαφή, το leon bet εξασφαλίζει ότι το παιχνίδι παραμένει πάντα μια ευχάριστη διαδικασία. Αν θέλετε να ανακαλύψετε γιατί το leon casino θεωρείται μια από τις καλύτερες επιλογές για το 2024, δεν έχετε παρά να πραγματοποιήσετε το leon casino login και να εξερευνήσετε τη μεγάλη βιβλιοθήκη παιχνιδιών. Η ποιότητα των υπηρεσιών και η σταθερότητα της πλατφόρμας είναι οι λόγοι που το καθιστούν σημείο αναφοράς στον χώρο του online casino. Επισκεφθείτε το leon σήμερα και δείτε την τύχη σας να αλλάζει.

  2. Помощь может включать консультацию, детоксикацию, стационар и дальнейшее сопровождение по показаниям.
    Узнать больше – [url=https://vyvod-iz-zapoya-v-ekaterinburge19.ru/]нарколог на дом вывод из запоя в Екатеринбурге[/url]

  3. Публикация охватывает основные направления развития современной медицины. Мы обсудим значимость научных исследований, инноваций в лечении и роли общественного участия в формировании системы здравоохранения.
    Всё самое вкусное внутри – [url=https://shkatulkaesoteric.ru/narkologicheskij-centr/]медцентр от алкоголизма[/url]

  4. Zoek je een betrouwbare en vermakelijke plek voor jouw geliefde casinospellen, dan is de kans groot dat je de naam koning casino al eens bent tegengekomen [url=https://koning-casino-nederland-5.pages.dev]koning[/url] . Als je een enthousiaste speler bent die waarde hecht aan kwaliteit, veiligheid en een breed spelaanbod, dan biedt deze website een uitstekende ervaring. In deze koning casino review duiken we dieper in naar wat dit platform zo uniek maakt voor de Nederlandse markt.

    Het platform koning casino nederland staat bekend om zijn gebruiksvriendelijke interface en het ruime assortiment aan gokkasten, tafelspellen en live casino opties. Veel spelers die op zoek zijn naar een koning bet casino ervaring, komen hier terecht vanwege de eenvoudige interface en de stijlvolle presentatie. Of je nu een startende speler bent of een ervaren rot in het vak, online casino koning zorgt ervoor dat iedereen meteen kan beginnen met spelen. Het is duidelijk dat het merk koningcasino zich richt op een publiek dat zorgeloos entertainment wenst.

    Een groot voordeel van casino koning is de focus op klanttevredenheid en een betrouwbare spelomgeving. Wanneer je kiest voor casino koning bet, profiteer je van vlotte prestaties en een geoptimaliseerde mobiele ervaring. Hierdoor kun je altijd en overal genieten van jouw favoriete games. Het koning online casino onderscheidt zich door een breed assortiment aan spellen dat constant wordt geupdatet, waardoor er altijd wel iets nieuws te ontdekken valt.

    Het is niet voor niets dat de term koning in de gokwereld vaak synoniem staat voor een koninklijke behandeling van de spelers. Door te kiezen voor dit platform, kies je voor een partij die begrijpt wat spelers in Nederland nodig hebben. Als je op zoek bent naar een betrouwbaar adres om je geluk te beproeven, dan is deze bestemming zeker het overwegen waard. Bezoek de website en ontdek zelf waarom zoveel spelers zich al hebben aangesloten bij de koning van de online gokwereld. Ervaar vandaag nog de opwinding en de vele winstkansen die op je wachten bij dit hoogwaardige platform.

  5. highflybetbonuslogin-exponge

    In case you find yourself attempting to maximize your gaming adventure, the platform located at highflybetbonuslogin.net/bonus serves as the destination to begin [url=https://highflybetbonuslogin.net/bonus]bono de casino highflybet sin deposito[/url] . Users who are looking for the top prizes regularly search for a trustworthy bono highflybet to kickstart their journey. By utilizing the accurate codigo de bono highflybet, you can activate exclusive promotions that increase your possibilities of profiting throughout a broad selection of wagering titles. Even if you are a devotee of spinners or card classics, grasping how to apply your code remains vital for securing the peak worth from your payments.

    Among the most popular perks by fresh players is the bono de casino highflybet sin deposito. This sort of deal seems very appealing since it allows you to evaluate the platform avoiding gambling your personal cash. Discovering a valid bono highflybet sin deposito acts as a superb method to explore the layout and game library with total serenity. Furthermore, many players constantly search for the freshest codigo promocional highflybet to ensure they are seizing profit of all active offer.

    Regarding individuals looking using somewhat different terms, the site also caters to users looking for a bono high fly bet. Simply typing the correct codigo de bono high fly bet throughout your account steps can result in major gains in your funds. If you were hunting for a bono de casino high fly bet sin deposito, you stay not by yourself; this remains among the most favored methods to become active. Acquiring a bono high fly bet sin deposito is frequently the first step toward a winning playtime. Regularly recall to check for the highly current codigo promocional high fly bet to stay informed on the freshest benefits. Through spending the effort to confirm your sequence, you ensure where your membership gets correctly credited with the prizes you earn. Check out the portal now to view what incentives happen to be right now pending for you and heighten your wagering session to fresh levels.

  6. Эта публикация посвящена актуальным вопросам современной медицины и здравоохранения. Мы обсудим новейшие технологии диагностики и лечения, а также их влияние на продолжительность и качество жизни. Читатель найдет здесь информацию о научных исследованиях и перспективных разработках, доступно изложенную для широкой аудитории.
    Почему это важно? – [url=https://cdmarf.ru/kapelnica-ot-zapoya-effektivnoe-sredstvo-v-borbe-s-alkogolnoj-zavisimostju/]Частная наркологическая клиника В Белгороде[/url]

  7. Этот информативный текст сочетает в себе темы здоровья и зависимости. Мы обсудим, как хронические заболевания могут усугубить зависимости и наоборот, как зависимость может влиять на общее состояние здоровья. Читатели получат представление о комплексном подходе к лечению как физического, так и психического состояния.
    Прочитать подробнее – [url=https://homerenow.ru/pages/vyvesti-iz-zapoya-na-domu-nedorogo/]круглосуточный вывод из запоя на дому[/url]

  8. A thrilling digital entertainment platform called The Chicken Road Casino has generated significant curiosity among English gamblers pursuing for a varied range of wagering options [url=https://chicken-road-uk-63.vercel.app]Chicken Road Casino United Kingdom[/url] .

    Would you intrigued about its legitimacy, gameplay, or if it deals with live funds, this detailed guide offers a full insight to guide you in making an smart call.

    One of the most questions about The Roadside Gambling Hub centers around their validity. While the hub appears to provide a diverse collection of options, including slot games, table activities, and real-time moderator varieties, it’s critical to verify its approval and safeguards before playing for real money. Trusted wagering venues in this United Kingdom must be registered by the UK Gambling Commission, validating fair entertainment and ethical gambling practices. Enthusiasts must always properly verify for proper licensing prior to depositing funds.

    Regarding those interested in gambling Roadside Casino options in that United Kingdom, the site claims to accommodate real-money payments, though punters must to confirm funding methods and cash-out guidelines. A plethora of trusted gambling venues supply secure banking alternatives like debit tapes, e-wallets wallets, and cryptocurrencies assets. If Roadside Casino is indeed reliable, it is expected to provide open specifics on deposits, withdrawals, and some associated costs.

    An review of Chicken Road Casino likewise focus on the kinds of activities on offer. The site appears to host favourite wheel activities, hand types, and online entertainment games, adapting to diverse tastes. Nevertheless, the standard and justice of these options hinges on the creation suppliers supporting. Well-known companies like NetEnt, Micro Games, or Evolution Gaming are industry norms, so players must to find for these identifiers when investigating the option archive.

    Are you wondering whether Chicken Road Casino titles are reliable, it’s worth to research gambler testimonies. While several enthusiasts may describe good feedback, others possibly raise questions about equity or user service. Checking neutral review platforms or forums spaces can deliver extra insights before investing in genuine wagering.

    For those looking to play The Roadside Gambling Hub in that United Kingdom, it’s important to verify the site adheres with regional wagering guidelines. Genuine domestic gambling sites are required comply to rigorous guidelines, encompassing age verification, safe playing features, and equitable option results. Always emphasise sites that prioritise gambler security and transparency.

    To summary, while Roadside Casino possibly offer an inviting selection of options, enthusiasts are advised to perform comprehensive research before participating in real-money entertainment. Checking for valid approval, protected funding routes, and gambler reviews will aid assess how is one trustworthy alternative for English enthusiasts. If you’re exploring free games or assessing live deposits, due analysis is vital to a secure and fun entertainment experience.

  9. Информация об обращении не передается третьим лицам, а детали лечения обсуждаются только с пациентом.
    Подробнее – [url=https://vyvod-iz-zapoya-v-ekaterinburge21.ru/]помощь вывод из запоя[/url]

  10. Мы рассмотрим современные вызовы здравоохранения и пути их решения с помощью технологий и научных исследований. В статье собраны данные о новых лекарствах, методах диагностики и системном подходе к улучшению здоровья населения.
    Не пропусти важное – [url=https://clear-dent.ru/kodirovanie-ot-alkogolizma-v-belgorode/]deltaclinic белгород[/url]

댓글 달기

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