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”의 77,140개의 댓글

  1. Эта публикация посвящена актуальным вопросам современной медицины и здравоохранения. Мы обсудим новейшие технологии диагностики и лечения, а также их влияние на продолжительность и качество жизни. Читатель найдет здесь информацию о научных исследованиях и перспективных разработках, доступно изложенную для широкой аудитории.
    Узнай первым! – [url=https://ego-yuriie.ru/kapelnitsa-ot-pohmelya-v-belgorode/]наркологическаяклиникадельта в белгороде[/url]

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

  3. goplay365-jendith

    vari dei più popolari portali all’interno il mondo delle gioco online, in particolare in Italia, dove la domanda per alternative regolari e certificate è in crescita [url=https://goplay365-17.vercel.app]Goplay365 È Legale[/url] . Se hai bisogno di notizie su la piattaforma in questione, i bonus, la sua affidabilità o eventuali alternative, questo contributo ti darà una panoramica chiara.

    Per cominciare, la piattaforma mettere a disposizione giocabilità sportive, attività e giochi digitali, ma risulta importante evidenziare che il suo status in il paese è spesso dibattuta. Numerosi giocatori si interrogano se la piattaforma sia conforme, e la decisione dipende dalla regolamentazione attuale. In la penisola, le piattaforme di scommesse devono essere approvate dalla Commissione Italiana per le Scommesse Sportive (CIS), e Goplay365 non è incluso tra quelle formalmente certificate. Questo vuol dire che, malgrado il portale funziona, non assicura un livello di affidabilità e chiarezza come quello delle alternative certificate.

    Le valutazioni su questo portale sono diverse: alcuni utenti valorizzano la varietà di divertimenti e le offerte, invece vari mettono in guardia difficoltà connessi ai trasferimenti, alla mancanza di autorizzazione e al rischio di venire fermato dai istituti finanziari italiani. Di fronte a ciò, chi desidera un’esperienza sicura e legale dovrà considerare scelte come portali autorizzati. Le opinioni di questo portale frequentemente allertano i clienti principianti, evidenziando la probabilità di subire perdite risorse mancando di assicurazioni.

    Se risulti curioso a la piattaforma per le offerte, risulta fondamentale valutare minuziosamente le clausole e le condizioni. Vari promozioni, come promozioni speciali, risultano trappole per incitare gli utenti a giocare in maniera intenso. Prima di tutto iscrierti, controlla continuamente i feedback degli altri giocatori e verifica se la piattaforma appare davvero trasparente.

    Alla fine, Goplay365 non viene legalmente approvato in Italia, il che lo posiziona una opzione incerta per chi ricerca sicurezza e legalità. Se stai cercando un’alternativa più sicura, diviene consigliabile optare per piattaforme autorizzati e che presentano ottime valutazioni, dove i trasferimenti sono protegti e i requisiti di gioco sono trasparenti. Prima di, informati bene sulle valutazioni di questo portale e analizza se i pro eccedono le criticità.

  4. jackpot-flourry

    Il settore del betting digitale è in perpetua trasformazione e in mezzo a siti più discussi del periodo troviamo senza esitazione Jackpot Frenzy [url=https://jackpot-frenzy-4.vercel.app]jackpot frenzy recensioni[/url] . Se ti trovi a esplorando una fresca avventura di divertimento virtuale, risulta fondamentale esaminare cosa renda questo sito così seguito tra gli giocatori. Entrare a Jackpot Frenzy comporta entrare in un contesto vivace dove la eterogeneità è la parola d’ordine. Mediante una struttura facile, effettuare il Jackpot Frenzy login rappresenta un’operazione istantanea che consente di iniziare immediatamente a svagarsi. Per chi si trovano alla ricerca di dati approfonditi, scorrere le Jackpot Frenzy recensioni è il iniziale movimento suggerito per capire l’credibilità del portale. Stando a tutte le attendibile Jackpot Frenzy review presente sul internet, il punto di forza principale sta nella estesa libreria di prodotti presentati. Le Jackpot Frenzy slots rappresentano davvero il vanto della piattaforma, con una scelta che fluttua dai tradizionali senza tempo alle recenti proposte più innovativamente sofisticate. Tanti player in Italia si interrogano se il Jackpot Frenzy casino costituisca la opzione ideale per le proprie partite di gioco. Analizzando le Jackpot Frenzy casino recensioni, emerge un parere ottimale riferito a sia la fluidità del software che la bontà del servizio clienti riservata al settore tricolore. Il domain si nota come un vero casino Jackpot Frenzy abile nel conformarsi perfettamente anche ai device mobile, offrendo un Jackpot Frenzy casino login fluido in ogni luogo ti sia. Sia tu risulti un veterano di slot machine o un esordiente, l’gamma del dominio sembra completa e bilanciata. Per coloro che si collega da abitazione, Jackpot Frenzy casino Italia garantisce un’sessione avvolgente e affidabile, progettata per chi desidera adrenalina e svago responsabile. In sintesi, chi intende di visitare il mondo di jackpotfrenzy troverà un ambiente di divertimento solido, denso di promozioni e sempre rinnovato. Se sei preparato a provare la sorte, accertati di esaminare le condizioni del contratto prima di iniziare il personale viaggio dentro della piattaforma.

  5. highflybet-enligh

    When thinking about choosing a trustworthy portal for your gaming experience, understanding clearly who you are interacting with is essential [url=https://highflybet-reviewlogin.org/about-us]highflybet[/url] . The about us page at highflybet-reviewlogin.org acts as a clear gateway for members looking for a trustworthy space to engage with high fly bet. Our primary goal is to provide players with an unbiased, detailed, and clear analysis of the features provided by the site, verifying that every player can reach an calculated selection prior to they begin their adventure.

    At highflybet, we understand that the online sphere can often seem overwhelming. Featuring endless alternatives available, locating a site that values safety, honest play, and player satisfaction is a hard challenge. Our team is dedicated to bridging that void by offering in-depth analyses and login guidance. We maintain that transparency is the foundation of a positive experience. By deconstructing the capabilities, user interface, and total trustworthiness of high fly bet, we empower our group to traverse the portal with utmost assurance.

    Honesty is at the heart of all that we perform. We never just recap marketing offers; we examine the practical and functional parts of the site to guarantee that it satisfies the stringent levels our readers anticipate. Regardless of if you are seeking pointers on the best way to access your profile or you wish to fathom the core operations of the platform, our info is designed to be your go-to tool.

    We are devoted to ongoing improvement and candor. Our goal is to cultivate a network where feedback is encouraged and in which all visitor perceives backed. Through keeping a sharp look on the newest additions and site adjustments, we guarantee that the information concerning highflybet remains up-to-date and actionable. If you happen to be searching for a reliable companion in your web-based play pursuits, look no further our expert review. We encourage you to investigate our materials and uncover the ways we can aid you to maximizing your allotted session at high fly bet, guaranteeing a secure and enjoyable adventure from its beginning to the conclusion.

  6. Этот информативный текст сочетает в себе темы здоровья и зависимости. Мы обсудим, как хронические заболевания могут усугубить зависимости и наоборот, как зависимость может влиять на общее состояние здоровья. Читатели получат представление о комплексном подходе к лечению как физического, так и психического состояния.
    Интересует подробная информация – [url=https://renobuilder.ru/pages/vyvedenie-iz-zapoya-nedorogo-moskva/]вывод из запоя на дому конфиденциально[/url]

  7. В этом обзоре мы обсудим современные методы борьбы с зависимостями, включая медикаментозную терапию и психотерапию. Мы представим последние исследования и их результаты, чтобы читатели могли быть в курсе наиболее эффективных подходов к лечению и поддержке.
    Подробности по ссылке – [url=https://chelnyhools.ru/chastnaya-narkologicheskaya-klinika-v-belgorode/]кодирования от алкоголизма в Белгороде[/url]

  8. Публикация посвящена жизненным историям людей, успешно справившихся с зависимостью. Мы покажем, что выход есть, и он начинается с первого шага — принятия проблемы и желания измениться.
    Почему это важно? – [url=https://cvetnik.me/pages/narkologicheskie-kliniki-centry/]наркологический центр врачи[/url]

  9. Wer, der auf der Jagd nach den attraktivsten Offerten fur Online-Casinos ist, trifft regelma?ig auf den faszinierenden Anbieter Spino Gambino [url=https://spino-gambinobonus.com.de/bonus]spino gambino bonus code[/url] . Um alles Optimale aus Ihrem Spielerlebnis zu erzielen, gilt das Verwenden einer passenden Offerte oft der erste Schritt. Auf der Webseite finden Sie alle relevanten Informationen, um fur sich besondere Boni zu ergattern. Wenn Sie den richtigen spinogambino bonus code verwenden, konnen Sie Ihr Startguthaben spurbar verbessern sowie Ihre Siegeschancen bei einer Vielzahl von Spielen ausbauen.

    Viele neue Spieler fahnden explizit nach dem spino gambino no deposit bonus code, um das Portal risikofrei unter die Lupe zu nehmen. Solch ein spinogambino no deposit bonus ist ideal, um das Spielsortiment auszutesten, ohne private Mittel auf das Konto uberweisen zu mussen. Selbst Profi-Spieler suchen konstant nach dem aktuellen spinogambino promo code, weil solche Zeichenfolgen oft nur fur kurze Zeit gelten und wertvolle Zusatzbelohnungen aktivieren. Jeder, der sich unmittelbar nach der Registrierung weitere Vorteile holen will, sollte sichergehen, ob ein spezieller spino gambino bonus code bereitsteht, um von zusatzlicher Aufwertung zu zehren.

    Besonders beliebt sind in der Spielerschaft die hei? ersehnten spinogambino freispiele. Mit ihnen lasst sich, angesagte Slots zu testen und echtes Geld zu gewinnen, ohne das personliche Guthaben zu belasten. Ganz gleich, ob Sie nach spino gambino freispiele fur bestimmte Automaten Ausschau halten oder einen allgemeinen spino gambino promo code aktivieren mochten, die Zusammenfassung auf der verlinkten Seite gibt eine tolle Hilfestellung. Achten Sie stets darauf, den entsprechenden spinogambino bonuscode richtig in der Banking-Sektion einzutragen, um zu gewahrleisten, dass die Gutschrift reibungslos erfolgt.

    Zusammenfassend lasst sich sagen, dass das stetige Ansteuern der Infoplattform fur den Bonus ohne Einzahlung rentiert. Egal ob Sie mit wenig Geld beginnen oder fokussiert nach Bonusaktionen suchen, mit dem korrekten spinogambino bonus code erhohen Sie den Spielspa?. Gebrauchen Sie die Promotionen geschickt, studiere die Umsatzvorgaben grundlich und erleben Sie die bunte Gaming-Welt von Spino Gambino mit der Extra-Unterstutzung attraktiver Bonusangebote. [url=https://www.bruchlee.com/south-asian-geopolitics/%e0%a6%ad%e0%a7%82-%e0%a6%b0%e0%a6%be%e0%a6%9c%e0%a6%a8%e0%a7%80%e0%a6%a4%e0%a6%bf/#comment-84920]Der beste Spino Gambino Bonus Guide fur alle Spieler: Jetzt alle Promo-Codes, Startguthaben und Gratis-Spins bequem finden![/url] [url=https://brilliantbluelogistics.com/2024/03/25/hello-world/#comment-23317]Der umfassende Spino Gambino Bonus Guide fur alle Spieler: Heute alle Promo-Codes, Startguthaben und Gratis-Spins direkt abgreifen![/url] e4_5623

  10. Этот метод направлен на выявление и замену негативных мыслей и стереотипов поведения, связанных с потреблением алкоголя. Пациент учится отслеживать свои эмоциональные реакции и заменять деструктивные установки конструктивными стратегиями противостояния стрессу.
    Узнать больше – http://lechenie-alkogolizma-sochi0.ru/klinika-lecheniya-alkogolizma-v-sochi/

댓글 달기

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