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,781개의 댓글

  1. hraci automaty zdarma fortuna casino je spoДѕahlivГ©
    sk casino guru hazardnГ­ hry automaty zdarma novГ© casina 2026 Online hracie automaty spiny zdarma za registraciu poker casino online
    automaty joker 81 zdarma slotwolf casino bonus

  2. В этой статье обсуждаются актуальные медицинские вопросы, которые волнуют общество. Мы обращаем внимание на проблемы, касающиеся здравоохранения и лечения, а также на новшества в области медицины. Читатели будут осведомлены о последних событиях и смогут следить за тенденциями в медицине.
    Подробнее тут – [url=https://moyateplica.ru/pages/narkologicheskaya-pomosch-na-domu-anonimno/]выезд на дом нарколога анонимно[/url]

  3. This popularity of online gambling has soared within Southeast Asia, alongside among the highly coveted experiences targeting regional gamers stands as the plinko game [url=https://plinko-83.onrender.com]plinko casino game[/url] . Should you are hunting for an engaging plus fast-paced way to wager, the site hosted at plinko-83.onrender.com delivers a streamlined session customized for devotees regarding this traditional arcade-style entertainment. Whether the player happen to be a novice otherwise a veteran master, the plinko casino game gives a special mix involving chance plus tactics that keeps users returning to seek additional action.

    Regarding people hunting for a trustworthy plinko malaysia portal, this iteration offers a fluid layout which runs perfectly across both computer plus mobile gadgets. The primary appeal concerning any plinko online game rests within its ease. Users drop a sphere starting at the top of a pyramid-shaped layout packed containing obstacles, observing while it rebounds down to land inside payouts at the floor. This straightforward mechanic certainly turned the plinko game online a preferred in the area circle.

    Plenty of participants in the territory are purposefully hunting for a plinko game online real money experience. While various variations appear, it seems vital to choose sites which feature simple navigation and transparent outcomes. By selecting a specialized plinko casino, you certify which your betting time stays focused on enjoyment and potential prizes. The platform located at plinko-83.onrender.com stands built to address the increasing need regarding available digital wagering, making it a superb destination for individuals interested in plinko malaysia real money prospects.

    While the user investigate the domain of plinko online, recall to bet carefully plus understand the mechanics of the grid. The thrill experienced by seeing the sphere travel the pins toward rewarding positions remains unsurpassed. If you are ready to verify your gut feeling, this portal provides an optimized way to enjoy the classic plinko adventure. Jump into the action today plus discover the reason this game certainly grown into a fixture for enthusiasts looking for entertainment plus quick play within Malaysia. Investigate the different betting selections and savor the rush concerning every bet.

  4. Το Leon Casino είναι τον κορυφαίο προορισμό για τους Έλληνες παίκτες που ψάχνουν μια ολοκληρωμένη εμπειρία τυχερών παιχνιδιών [url=https://leon-casino-5.weaverkevinin7twa3.workers.dev]leoncasino[/url] . Αν ψάχνετε την ιδανική πλατφόρμα για online στοίχημα και παιχνίδια καζίνο, το leon casino διαθέτει μια τεράστια ποικιλία από slots, από κλασικούς κουλοχέρηδες μέχρι live τραπέζια με πραγματικούς κρουπιέρηδες. Η πλατφόρμα leon ξεχωρίζει για την ευχρηστία της και την φερεγγυότητα της, εξασφαλίζοντας ότι κάθε χρήστης απολαμβάνει ασφαλές και δίκαιο παιχνίδι.

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

    Διαλέγοντας το leon, οι χρήστες επωφελούνται από ένα σύγχρονο περιβάλλον που ανανεώνεται συνεχώς με νέους τίτλους και προσφορές. Το leon gr έχει εναρμονιστεί στις ανάγκες του ελληνικού κοινού, προσφέροντας υποστήριξη και λειτουργικότητα που καλύπτει ακόμα και τους πιο απαιτητικούς παίκτες. Είτε είστε λάτρης του live καζίνο είτε προτιμάτε το στοίχημα, το leon bet αποτελεί μια ολοκληρωμένη λύση που συνδυάζει διασκέδαση και ποιότητα. Με σταθερή παρουσία στον χώρο, το leoncasino συνεχίζει να κερδίζει την εμπιστοσύνη του κοινού, προσφέροντας μια κορυφαία εμπειρία παιχνιδιού. Αν λοιπόν αναζητάτε μια πλατφόρμα που συνδυάζει την ευκολία χρήσης με τη μεγάλη γκάμα παιχνιδιών, το Leon Casino είναι ο προορισμός που πρέπει να επισκεφθείτε. Παίζετε πάντα υπεύθυνα, εκμεταλλευόμενοι τις υπηρεσίες που παρέχει το leon casino για μια αξέχαστη εμπειρία στο διαδίκτυο. Η ποιότητα του leon bet casino είναι η εγγύηση για ποιοτικές στιγμές παιχνιδιού κάθε στιγμή της ημέρας.

  5. onlyspins-optinia

    Αυτό το Το OnlySpins καζίνο είναι ένα από τα πιο δημοφιλή online καζίνο που προσφέρει στους παίκτες προσφορές προσφορές για προσφορές με τις δωρεάν περιστροφές που διαθέτει [url=https://onlyspins-casino-14.pages.dev]only spins[/url] .

    Αν ζητάτε για μια περίσταση παιχνιδιού με αξιοπρεπείς επιστροφές και προσφορές για κέρδη, το OnlySpins μπορεί να είναι η ιδανική επιλογή.

    Σε αυτό το κείμενο θα παρουσιάσουμε τι διαθέτει το OnlySpins, πώς μπορείτε να κάνετε εγγραφή και τι αξίζει να ξέρετε πριν αρχίσετε.

    Το OnlySpins Casino είναι γνωστό για τις δωρεάν προσφορές που έχει σε ποικίλες σλοτ τύχης, όπως μηχανές τύχης, ψηφιακά παιχνίδια και διαφορετικά παιχνίδια τύχης.

    Οι δωρεάν προσφορές είναι μια εξαιρετική ευκαιρία για τους νέους χρήστες επισκέπτες να προσπαθήσουν τα παιχνίδια συν να πρέπει να επενδύσουν χρήματα.

    Επιπλέον, το καζίνο προσφέρει και ειδικές προσφορές για τους νέους χρήστες, όπως βόνους και ειδικές free spins.

    Για να αρχίσετε και να κάνετε σύνδεση, θα πρέπει να δημιουργήσετε λογαριασμό στο OnlySpins. Ο ψηφιακός τόπος είναι εύκολα διαθέσιμος και έχει προσαρμοσμένη προς τον χρήστη επιφάνεια, που επιτρέπει στους χρήστες να απολαύσουν τα παιχνίδια συν προβλήματα.

    Το OnlySpins Casino έχει επίσης διάφορες προσφορές πληρωμής, όπως ψηφιακές προσφορές, ηλεκτρονικά πορτοφόλια και ψηφιακά νόμισμα, προσφέροντας την προσφορά καταβολής και επιστροφής προτιμώμενη και γρήγορη.

    Σε μια onlyspins casino review OnlySpins, θα πρέπει να προσδιοριστεί ότι το OnlySpins διαθέτει μια μεγάλη προσφορά σπορ από επιλεγμένες εταιρείες όπως NetEnt, Microgaming και Playtech.

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

    Το OnlySpins Casino είναι κατάλληλο για όσους αναζητούν ένα αξιόπιστο και ευχάριστο χώρο για παιχνίδια τυχερών. Με τις free spins και τις ευκαιρίες για κέρδη, προσφέρει μια προτιμώμενη επιλογή για χρήστες που προτιμούν να χρησιμοποιήσουν τα ψηφιακά καζίνο με ασφάλεια και προτιμώμενη.

    Αν ψάχνετε για ένα ψηφιακό καζίνο με onlyspins gr, τότε το OnlySpins είναι μια προτιμώμενη προσφορά που αξίζει να δοκιμαστεί.

  6. To users hunting for a high-end gaming journey, the golden lion platform stands out as a attractive destination [url=https://golden-lion-2.onrender.com]goldenlion casino[/url] . As an established name in the virtual gambling space, the golden lion casino has developed a standing for presenting a wide array of options that cater to both novices and experienced VIP players. Regardless of whether you are reaching the webpage using a PC or a portable device, the goldenlion casino online session is built to be smooth, immersive, and highly engaging.

    Upon executing a detailed goldenlion casino review, it grows evident that the platform values customer contentment by means of a solid collection of reel games, roulette options, and niche titles. The aesthetic of the casino golden lion is refined, mirroring the status connected with the company. Those who decide to browse the casino goldenlion will locate an layout that is easy to use, ensuring that your favourite options are constantly simply a few touches removed.

    Provided that you are currently perusing a goldenlion review to determine if this is the right site for you, consider the range of offers available. The goldenlion ecosystem is organised to reward dedication, offering players with numerous opportunities to boost their balance. In addition, the golden lion online platform handles safety and fairness seriously, delivering peace of mind for anybody who loves playing at the goldenlion.

    The factor that separates the golden lion casino aside from its rivals is its dedication to providing a consistent and premium setting. Starting from the time you register at the goldenlion, you are offered to a expert gaming atmosphere that reflects the rush of a brick-and-mortar location. Either way you are spinning the spinners or planning at the table area, the golden lion online play is engineered for speed. Regarding those seeking a reliable and entertaining gaming ally, the golden lion continues to be a leading selection in the industry. Its combination of cutting-edge technology, option variety, and customer-oriented tools ensures that it continues to be a sought-after hub for betting enthusiasts over the UK and elsewhere.

  7. naj online casino ako ziskat bonus
    casino free spiny zadarmo europska ruleta online zadarmo herne automati zdarma book Dnesne free spiny fortuna 5 € za registráciu hry zadarmo automaty
    hraci automaty zdarma slovensko 5 valcove automaty hrat zdarma

  8. Мы рассмотрим современные вызовы здравоохранения и пути их решения с помощью технологий и научных исследований. В статье собраны данные о новых лекарствах, методах диагностики и системном подходе к улучшению здоровья населения.
    Что скрывают от вас? – [url=https://finbizhub.ru/pages/lechenie-alkogolizma-ekaterinburg/]лечение алкогольной зависимости екатеринбург[/url]

  9. декларация ТР ТС Современный **сертификат ISO 45001** снижает вероятность производственных инцидентов и демонстрирует заботу руководства о каждом сотруднике. Успешные компании выбирают высокие стандарты безопасности труда.

  10. Sicheres Zocken bleibt dieses zentrales Anliegen bei Spino Gambino, denn der Schutz der Teilnehmer besitzt fur das Online-Casino den Vorrang [url=https://spino-gambinocasino.ch/verantwortungsbewusstes-spielen]spinogambino[/url] . User, welche die Plattform von spinogambino wahlt, entscheidet sich in eine Sphare, worin Unterhaltung und Sicherheit Hand in Hand gehen. Das Ziel dieses Portals ist es, eine gefahrlose Zock-Umgebung aufzubauen, wo Spieler die stete Ubersicht uber ihre Aktivitaten bewahren.

    Auf der Seite fur verantwortungsbewusstes Spielen bei dem Anbieter finden Spieler umfassende Informationen und unterstutzende Hilfsmittel, um das eigene Spielverhalten bewusst zu regulieren. Es ist essenziell anzuerkennen, dass Glucksspiel primar als Zeitvertreib gedacht ist und nicht als Methode zur Einkommenserzielung gelten sollte. Bei diesem Anbieter gelten daher verschiedene Praventionsma?nahmen bereitgestellt, einschlie?lich der Option, eigene Ausgabenlimits zu definieren. Die Begrenzungen helfen dabei, die Ausgaben permanent zu uberwachen und zu garantieren, dass die Kosten das private Wohl nicht beeintrachtigen.

    Sollten Spieler zu irgendeinem Zeitpunkt den Eindruck gewinnen, dass die Steuerung uber das Spiel abnimmt, gewahrt Spino Gambino au?erdem Moglichkeiten fur Pausen sowie einen temporaren Ausschluss an. Diese Ma?nahmen sind notwendig, um eine Pause einzulegen und den wichtigen Freiraum zu bekommen. Die Webseite enthalt zusatzlich nutzliche Verbindungen zu Beratungs-Profis bereit, die wahrend Problemen oder Anliegen hilfreich unterstutzen.

    Die Bemuhungen dieses Casinos beweist sich in der Transparenz sowie der deutlichen Vermittlung dieser Richtlinien. Ein sicheres Verhalten mit den Angeboten stellt die Voraussetzung fur ein anhaltendes und tolles Erlebnis. Wer vorher Bescheid wei? und die Instrumente zur Selbststeuerung anwendet, kann den ganzen Mehrwert von diesem Portal sicher ausschopfen. Es liegt in der Eigenverantwortung eines jeden Users, diese Sicherheitsmechanismen aktiv zu nutzen, um die Ausgewogenheit zwischen Entertainment und Verlusten zu sichern. Setzen Sie auf die Expertise von spinogambino und etablieren Sie den Selbstschutz zu einem fixen Element Ihrer Spielweise, um ein gefahrloses und faires Erlebnis zu sichern. [url=https://diywindforum.com/index.php?topic=713.new#new]Vernunftiges Glucksspiel bleibt dieses Hauptziel bei Spino Gambino – Wichtige Hinweise zur Spielkontrolle auf unserer Plattform.[/url] [url=https://www.2shane.com/index.php?topic=12939.new#new]Vernunftiges Glucksspiel stellt dieses wichtiges Thema in Bezug auf Spino Gambino – Alle Informationen zum verantwortungsvollen Umgang im Online-Casino.[/url] fec9800

댓글 달기

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