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”의 21,766개의 댓글

  1. spinmama-scierve

    Jeder, der auf der Jagd nach einem exzellenten Portal fur erstklassiges Online-Entertainment ist, der kommt an dem Namen Spin Mama keinesfalls [url=https://spinmama-app.co.at/uber-uns]Spinmama[/url] . Diese Internetprasenz auf spinmama-app.co.at/uber-uns schenkt faszinierende Perspektiven hinter das Geschehen und zeigt, was dieses Angebot derart einzigartig gestaltet. Hinter dem Konzept von Spinmama steht ein engagiertes Team, welche sich verpflichtet fuhlt, Usern im osterreichischen Raum ein sicheres, eindeutiges und vor allem unterhaltsames Erlebnis bereitzustellen. Wer, welcher die Uber-uns-Seite besucht, erkennt zugig, dass dort User-Contentment und Qualitat ganz oben stehen. Das Ziel dieses Hauses besteht darin nicht blo?, eine einfache Plattform darzustellen, sondern ein vertrauensvoller Begleiter im Kosmos des digitalen Entertainments. Zudem priorisiert der Betreiber massiven Fokus auf eine moderne Benutzeroberflache, das gleichwohl am Computer als auch mobil eine fehlerfreie Leistung liefert. Bei Spinmama integrieren sich digitale Neuerungen nebst prazisen Vorstellungen zusammen, damit Usern einen flussigen Ablauf zu sichern. Ein zusatzlicher wichtiger Faktor, der auf dem Portal betont wird, ist die Hingabe fur verantwortungsbewusste Spielweise. Klarheit ist ein zentraler Grundpfeiler der Plattform, weshalb man sich klar zu den personlichen Werten sowie Normen glaubt. User konnen sich im FAQ-Bereich informieren, mit welchem Flei? die Games gepflegt werden und welche massiven Sicherheitskriterien die Entwickler anwendet. Das Zusammenspiel aus fundiertem Fachwissen nebst dem ununterbrochenen Ziel nach Fortschritt pradestiniert Spinmama zu einer ersten Anlaufstelle fur kritische Spieler innerhalb Osterreichs. Derjenige, demnach mehr uber die Philosophie, die Hintergrunde sowie die Mannschaft wissen will, findet auf der erwahnten Unterseite samtliche wichtigen Daten. Es ist diese offene Kommunikation, welche die Sicherheit der Community starkt und den Anbieter deutlich von der Konkurrenz differenziert. Werfen Sie einfach im Online-Auftritt hier, um tiefer in das Universum von Spinmama einzutauchen sowie die Idee hinter diesem fortschrittlichen Service zu verstehen. Dort begegnet Herzblut auf technisches Know-how fur ein absolut perfektes Vergnugen.

  2. chickenroad-absonia

    Within Chicken Road, our team acknowledges that trust serves as the basis of every digital gambling journey [url=https://chickenroad-casino-review.org/privacy-policy]Chicken Road[/url] . As you explore ChickenRoad, you are entrusting our staff with your personal data, while we treat that duty incredibly seriously. This confidentiality document is built to be transparent, guaranteeing that every user grasps exactly how their information is collected, kept, and protected during their time on our platform. By maintaining the highest standards of data security, Chicken Road confirms that your attention continues on enjoying our comprehensive casino reviews and expert views rather than stressing over your digital safety.

    When you navigate across ChickenRoad, we could harvest some data to boost your browsing encounter. This encompasses basic technical data including your network identifier, web application version, plus browsing habits across our site. This information is strictly used to enhance the performance of this service and to deliver customized material that aligns with your wagering desires. We want our readers to feel confident that ChickenRoad will never participate in the sale of sensitive data to outside entities. Your anonymity is essential, plus our procedures are regularly updated to adhere to international privacy laws, maintaining your profile protected at all times.

    Security is built within the framework of this site. We utilize sophisticated scrambling tools to protect your exchanges with this portal, confirming that all information submitted is guarded from unauthorized access. We encourage all visitors to check the entire confidentiality terms on our website to understand your legal powers concerning data access, correction, and erasing. In case you hold queries or issues concerning how ChickenRoad processes your data, our assistance crew is ready to clarify matters. Our goal is to provide a truthful, safe, plus an educational space for the gaming community. Via picking Chicken Road for your betting study, you are opting for a hub that prioritizes your confidentiality as much as it highlights offering the best gambling information accessible currently. We are committed to maintaining this integrity as we keep to evolve alongside our readers.

  3. Инфузионные схемы формируются из модулей: гидратация, коррекция электролитов, гастропротекция, при показаниях — мягкая анксиолитическая поддержка. Выбор модуля определяется ведущим симптомом и временем суток; дозы минимально достаточные, темп — контролируемый. Ниже — примерная матрица, по которой врач выбирает маршрут (окончательное решение зависит от противопоказаний и сопутствующих состояний).
    Подробнее тут – [url=https://narkolog-na-dom-petrozavodsk15.ru/]нарколог на дом круглосуточно цены[/url]

  4. Сын пошёл в первый класс, и мы сразу поняли — обычная школа не для нас. Сказали, что там можно учиться в своём темпе. Школа онлайн — попробовали и остались довольны. Учителя внимательные, не орут. И главное — он не боится школы. Онлайн-школа — это не компромисс. курсы онлайн для 11 класса [url=https://mobimarket96.ru/obrazovanie/distancionnoe-obuchenie-8-klass]курсы онлайн для 11 класса[/url] Там все контакты и условия для региона. Это работает. Школа онлайн — образование без стресса!

  5. Δείτε το εντυπωσιακό περιβάλλον του online gaming διά μέσου μιας αξιόπιστης πλατφόρμας που έχει κερδίσει την εμπιστοσύνη των μελών [url=https://baxter-bet-102.marblewhalenordicdf8at9090.workers.dev]baxterbet casino[/url] . Ο νύξη για το baxterbet, έναν χώρο ψυχαγωγίας που παρέχει πολυάριθμες επιλογές για τους οπαδούς του στοιχήματος και των τυχερών παιχνιδιών. Το baxter bet διακρίνεται για την άνετη χρήση του και τη απλή προς τον παίκτη δομή του, κάνοντας το κατάλληλο είτε για νέους αλλά και για έμπειρους παίκτες.

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

    Για το ελληνικό πλήθος, το baxterbet casino greece προσαρμόζεται απόλυτα στις ανάγκες της ελληνικής βάσης. Χάρη της εφαρμογής baxterbet gr, οι χρήστες έχουν τη δυνατότητα να απολαύσουν έμπιστες συναλλαγές, άμεσες αναλήψεις και φιλική εξυπηρέτηση παικτών. Δεν είναι τυχαίο ότι οι baxterbet κριτικες είναι πολύ ενθαρρυντικές, πιστοποιώντας την αξιοπιστία και τη εντιμότητα που πρεσβεύει η πλατφόρμα.

    Σε περίπτωση που αναζητάτε αξιόπιστες στοιχεία για τις δυνατότητες που προσφέρει το baxterbet καζίνο, οι baxterbet κριτικες τονίζουν τακτικά τα γενναιόδωρα μπόνους και τις προσφορές που επιβραβεύουν τόσο τα καινούργια καθώς και τα εγγραφμένα χρήστες. Δείτε τις ικανότητες που σας προσφέρει το baxter bet και βιώστε μια ξεχωριστή διαδρομή διασκέδασης με υπευθυνότητα και συνέπεια.

  6. Nel contesto dello scenario del gambling digitale, Cazeus risulta velocemente affermando quale una tra le siti piu interessanti dedicata agli amanti del betting [url=https://cazeus-casino-27.web.app]casino cazeus[/url] . Se stai cercando una panoramica completa, le cazeus recensioni evidenziano come codesto sito offra un’esperienza utente innovativa, usabile e dotata di opzioni. Entrare nel cazeus casino comporta immergersi dentro un enorme catalogo che spazia dalle slot machine piu recenti ai tavoli da gioco in modalita live, assicurando svago e affidabilita.

    Molti utenti che utilizzano su cazeus casino online apprezzano soprattutto la fluidita dell’interfaccia. Grazie a una strutturazione impeccabile, cazeus online casino funziona fluidamente con qualunque device, consentendo di divertirsi da ogni luogo. La vastita delle proposte costituisce uno dei punti di forza chiave: indipendentemente dal fatto di essere un veterano o un neofita, il casino cazeus propone soluzioni progettate per ogni fascia di budget. Analizzando ogni cazeus casino review presente sul web, emerge una costante gratificazione legata alla velocita delle transazioni e alla professionalita del supporto clienti, elementi fondamentali per chi cerca un sito affidabile per divertirsi su cazeus online.

    In merito a la clientela, cazeus italia e riuscita a creare un gruppo affiatato, proponendo bonus esclusivi e un piano ricompense che gratifica la costanza dei giocatori. Leggere le cazeus casino recensioni ti consentira a comprendere piu a fondo il metodo per ottimizzare i pacchetti promozionali e sfruttare al meglio gli strumenti offerte dal sito. Se sei alla ricerca di una piattaforma completa, la nostra cazeus review attesta che e un’opzione fantastica per chi cerca un contesto regolamentato e dinamico. Riassumendo, se vuoi testare un portale di ultima generazione, cazeus costituisce oggi una realta solida nel settore. Ricorda sempre di divertirti con moderazione e di verificare accuratamente sulle condizioni d’uso prima di intraprendere il tuo percorso su tale piattaforma.

  7. Быстро собираем первичную информацию, оцениваем риски и предлагаем подходящий вариант обращения.
    Дополнительная информация – [url=https://narkologicheskaya-klinika-balashiha15.ru/]narkologicheskaya-klinika-pomoshch-na-domu[/url]

  8. В этой статье мы рассмотрим современные достижения в области медицины, включая инновационные методы лечения и диагностики. Мы обсудим важность профилактики заболеваний и роль технологий в улучшении качества здравоохранения. Читатели узнают о влиянии медицины на повседневную жизнь и ее значение для современного общества.
    Рассмотреть проблему всесторонне – [url=https://fixbuilders.ru/pages/skolko-stoit-narkolog-na-dom/]частный нарколог на дом[/url]

  9. gtspinscasino4-neups

    Picking the right venue for your gaming journey is crucial, and our newest Gtspins Casino review aims to clarify what this site offers to players in the UK [url=https://gt-spins-casino-4.onrender.com]Gtspins Real Money[/url] . With the rise of the online gambling sector, many punters are looking for trustworthy choices, prompting common queries like is Gtspins legit or not. As an up-and-coming Gtspins digital casino, the site has been capturing interest by providing a diverse range of slot games and table games tailored for entertainment.

    When evaluating Gtspins UK, it is important to examine the overall user experience, design, and security protocols. For those keen on Gtspins cash gaming, the platform delivers a simplified approach to navigation and play. Many Gtspins reviews highlight the platform’s performance across different gadgets, enabling users to play their favourite titles on the go. If you are wondering about the platform’s reliability, checking if Gtspins is legitimate includes assessing the fairness of their software systems and the transparency of their T&Cs.

    Casino Gtspins has structured its platform to suit the needs of the contemporary gamer, concentrating on a broad selection of quality games. Whether you are a newcomer or a veteran in the Gtspins United Kingdom community, comprehending the promotion schemes and banking options is essential. While assessing any fresh platform, it is highly recommended that you perform your own due diligence. Gtspins continues to developing, striving to enhance its offerings for those looking for an engaging online experience.

    Ultimately, determining if Gtspins is legitimate relies on your personal preferences and your comfort level with the platform’s functionality. The Gtspins brand is working to build its standing in a competitive market. By keeping track of recent Gtspins reviews, users can remain updated about the newest news and offerings. If you decide to test the site, make sure that you always bet safely and within your means while enjoying what Gtspins Casino has to provide.

댓글 달기

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