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”의 67,934개의 댓글

  1. spingrannycasino-apono

    Vitajte v prostredi online hier, kde tradične pristupy konfrontuje s modernou technologiou [url=https://spingrannycasino.sk/o-nas]spingranny[/url] . Ak patrate po platformu, kde dokazete uziť kvalitnu zabavu a vnimať realne vzrusenie, web Spingranny je idealnou idealnou destinaciou. Nasa platforma bola vytvorena s viziou priniesť klientom v slovenskom priestore chranene, ľahko orientovateľne a hlavne putave prostredie, ktore napĺňa spičkove standardy v odvetvi hazardnych hier.

    Značka Spin granny neostava len pri virtualnych slotoch či stolovych klasikach. Je to skupina ľudi, ktori oceňuju kvalitu, rovnocenny pristup a rychlu podporu. Nasim zamerom je vybudovať priestor, kde kazdy hrač citi vitany a kde je ochrana osobnych udajov prioritou čislo jedna. Stale vylepsujeme na optimalizacii nasho portfolia, aby sme vam predstavili tie najnovsie tituly od spičkovych vyvojarov, ktore vas vtiahnu do hry prostrednictvom grafikou aj strhujucimi pribehmi.

    Z akeho dovodu si zvoliť prave Spingranny? Riesenie je jasna. Sme presvedčeni v transparentnosť a otvorenu komunikaciu. Či uz ste profesionalny hrač alebo čerstvy začiatočnik, nase rozhranie je navrhnute tak, aby ostalo intuitivne a pristupne pre kazdeho. Spin granny venuje obrovsku pozornosť na zodpovedne hranie, pretoze si uvedomujeme, ze idealna zabava je ta, ktora ostava pod kontrolou. Prinasame vam nastroje a udaje, ktore vam pomozu zachovať si vyrovnany pristup k hraniu.

    Za nasim vyvojom stoji tim profesionalov, ktori su spati svetom hier a poznaju poziadavkam slovenskeho publika. Vsetok prvok na nasom portali je produktom precizneho planovania a snahy ponuknuť vam spičkovy servis. Sme hrdi na to, ze Spingranny expanduje pre vernym hračom, ktori sa naspať radi vracaju. Vstupte k nam aj vy a objavte, prečo funguje Spin granny synonymom pre doveru a jedinečny zazitok. Čaka na vas okrem ineho siroky vyber hier, ale aj rychla podpora a spravodlive podmienky, ktore si zasluzite. Vychutnajte si vzrusenie, ktore vam ponukame, a pripojte sa sučasťou nasej rozsirujucej sa hernej rodiny uz dnes.

  2. spinogambinogame-Uteri

    When you access the primary website for spinogambino, it remains important to comprehend how we handle your personal information to provide a fluid experience [url=https://spinogambinogame.com/cookie-policy]spino gambino[/url] . The cookie policy for spino gambino is created to be clear, explaining accurately how our portal utilizes monitoring technologies to enhance site utility and customize your sessions. By accessing the page, you consent to the usage of cookies in alignment with our established standards.

    Cookies are compact text files that get stored on your hardware when you view our pages. At spinogambino, we utilize these elements for various key purposes. Mainly, they permit our software to remember your choices and settings, implying you do not need to adjust your account every occasion you come back. Additionally, these methods aid us study usage patterns and site efficiency, allowing the team behind spino gambino to recognize which capabilities are most sought-after and where we could require to perform system improvements.

    We categorize our cookies into utility, statistical, and promotional types. Functional cookies are entirely necessary for the site to work, while analytical cookies help us gather info on how visitors explore the site. Marketing cookies may be utilized to provide content that fits your personal interests. You possess the authority to handle or disable cookies using your client settings at any point; however, do be aware that stopping certain types might hinder your capacity to reach all features of the spinogambino platform efficiently.

    Protection and confidentiality are foundational elements of our service. Our cookie policy is regularly updated to mirror current compliance standards and to ensure that your data continues protected while you value your stay with spino gambino. We encourage all members to review this page frequently to keep informed about how we preserve your privacy. If you have any inquiries about these practices, kindly reach out to our support staff for more explanation on how we emphasize user experience and data safety across our online environment.

  3. сайт закладок наркотики героин закладки Мефедрон, кокаин, бошки, гашиш наркошоп дмт купить купить бошки марихуаны
    закладки шишек меф заказать закладки кристалловhttps://perevalskkupit.xyz трамадол где купить кокаин доставка

  4. В этой публикации мы исследуем ключевые аспекты здоровья, включая влияние образа жизни на благополучие. Читатели узнают о важности правильного питания, физической активности и психического здоровья. Мы предоставим практические советы и рекомендации для поддержания здоровья и развития профилактических подходов.
    Не упусти шанс – [url=https://shkatulkaesoteric.ru/vyvod-iz-zapoya-na-domu-cena/]вывод из запоя на дому цена[/url]

  5. В этой публикации мы рассматриваем важную тему борьбы с зависимостями, включая алкогольную и наркотическую зависимости. Мы обсудим методы лечения, реабилитации и поддержку, которые могут помочь людям, столкнувшимся с этой проблемой. Читатели узнают о перспективах выздоровления и важности комплексного подхода.
    Открыть полностью – [url=https://sipnn.ru/kompleksnyj-podhod-k-preodoleniyu-alkogolnoj-zavisimosti-etapy-terapii-i-vazhnost-professionalnoj-podderzhki/]delta clinic ru балашиха[/url]

  6. Наркологическая служба работает с разными ситуациями: короткий пивной запой, многодневные запои, продолжительный прием крепкого спиртного, повторные срывы, сочетание алкогольной зависимости с тревожными или депрессивными расстройствами. Помочь важно не только физически: после стабилизации обсуждаются психотерапия, кодирование, реабилитация и поддержка родственников. Пациента не принуждают к одному методу — программа формируется индивидуально. Если семья столкнулась с такой ситуацией впервые и близкие не уверены, что делать, можно позвонить, получить ответы на основные вопросы и записаться на консультацию.
    Подробнее – [url=https://1.vyvod-iz-zapoya-balashiha13.ru/]vyvod-iz-dlitelnogo-zapoya[/url]

  7. El juego El Desafío del Pollo ha provocado enorme debatido y pregunta, particularmente por esta mécánica original y las múltiples dudas sobre su legitimidad [url=https://chicken-road-es-64.igikukip670.workers.dev]Chicken Road Es Real[/url] . Muchos se nos cuestionamos si este juego tiene fundamento, si es en realidad una simple broma u simulación irreal.

    En este, examinamos los para descubrir cuál existe en el fondo de esta curiosa experiencia en redes.

    Chicken Road es real en el sentido de que se considera un accesible desde plataformas como PlataformaX, en el que los usuarios pueden vivirlo directamente. Aun así, su esencia depende en la subjetiva interpretación de todo persona. Este desafío propone momentos de incertidumbre y recompensa, en las que la elección de superarse o retroceder define la calidad de vivencia. Algunos lo interpretan un reflejo de la realidad real, en la que las múltiples acciones producen consecuencias, en cambio otros esta simulación perciben como representación de la tensión grupal o la decisión bajo ansiedad.

    Este cuestionamiento sobre si realmente el juego Chicken Road es real o falso generalmente surgir porque no es considerado un convencional que incluye imágenes o trama predecible. Esta base está en la interacción y la psicología del participante. No existe hay un claro éxito; todo depende de cómo cada persona lo viva. De ahí que varios esta simulación relacionan con experimentos de realidad alternativo u pruebas de ansiedad, donde la verdadera verdad está en la vivencia subjetiva.

    Si te cuestionas si realmente lo de Chicken Road es real, la clave consiste en que es una innovadora experiencia en línea con un claro objetivo: desafiar fronteras y comportamientos del ser humano. No es constituye una clara estafa, pero tampoco es una aplicación tradicional. Su atracción radica en el hecho de que desafía al jugador enfrentarse sus decisiones elecciones, algo muchos encuentran revelador u impactante.

    En resumen, Chicken Road es real en el sentido de que se ha creado como herramienta dinámica, pero su valor está en cómo todo jugador esta experiencia perciba. Independientemente de como una prueba social, una representación de la vida versus simplemente un juego de azar, esta esencia varía en la personal visión del jugador. Si quieres probar experimentarlo, es posible a través de mediante esta dirección, aunque ten en cuenta no existen premios físicas, únicamente la experiencia en sí.

  8. ohmyspins-EveseE

    Wer, der auf der Jagd nach einem innovativen und spannenden Spielerlebnis auf der Suche ist, darf das ohmyspins Casino unmoglich ignorieren [url=https://ohmyspins-13.onrender.com]ohmy spins[/url] . Die Plattform hat sich in der Welt der Online Glucksspiele einen Status erarbeitet, dadurch dass sie eine beeindruckende Spielauswahl mit einer einfachen Oberflache kombiniert. Wenn man sich die verschiedenen ohmyspins erfahrungen anschaut, fallt sofort auffallig, dass etliche Spieler vorwiegend die Vielfalt der bereitgestellten Slots und Live Dealer Tische schatzen. In einer tiefgrundigen ohmyspins bewertung offenbart sich des Weiteren, dass die digitale Umsetzung uberzeugt. Die Domain ist fix, ubersichtlich und kann intuitiv nutzen.

    Vielzahlige Nutzer, die auf der Suche nach einem seriosen Anbieter fahnden, durchstobern regelma?ig eine ohmyspins casino review, zwecks sich uber Sicherheitsstandards und Auszahlungsmodalitaten in Kenntnis zu setzen. Hierbei uberzeugt das Portal meist hervorragend ab, weil es durch verstandliche Bedingungen und einen hilfsbereiten Kundensupport uberzeugt. Speziell die ohmyspins erfahrung im mobilen Bereich wird mehrmals gelobt, da man unkompliziert unterwegs auf das gesamte Portfolio zugreifen kann. Genau das ist dieses nahtlose Zusammenspiel von Layout und Funktionalitat, das ohmyspins zu einer interessanten Anlaufstelle macht.

    Fur Neulinge in der Gilde ist eine grundliche ohmyspins casino erfahrungen Analyse oftmals der zentrale Schritt, um das personliche Budget klug anzulegen. Das Pramienprogramm beim casino ohmyspins ist hierbei ein entscheidender Faktor, der zahlreiche Spieler anzieht. Wer, der auf der Suche nach Spa? mit dem speziellen Extra ausschau halt, entdeckt bei ohmy spins eine Gaming-Umgebung, die auf die Wunsche der modernen Zeit angepasst ist. Unabhangig davon, ob klassische Spielautomaten oder moderne Tischspiele gewahlt werden, an dieser Stelle entdeckt jeder eine passende Option. Falls Sie eine objektive ohmyspins review durchlesen, werden Sie bemerken, dass besonders die stetigen Aktionen und das Bonusprogramm den langfristigen Spielspa? fordern. Zusammenfassend ist festzustellen, dass ohmyspins ein gro?artiges Paket bietet, das gleicherma?en Neulinge als auch geubte Spieler begeistert und durch ein transparents Gesamtkonzept besticht. Wer, deswegen ein anderes Casino ausprobieren mochte, entdeckt auf diesem Weg eine hervorragende Basis fur spannende Momente und mogliche Gewinne.

  9. spinogambinogame-grecigN

    When you engage with the Spino Gambino portal, your privacy and the safety of your individual info stay our primary goals [url=https://spinogambinogame.com/privacy-policy]spino gambino[/url] . Navigating the virtual realm needs faith, and at spinogambino, we are devoted to maintaining a open bond with our members. Our confidentiality policy explains precisely the way we amass, handle, and protect the data you submit while using our offerings. Regardless you are a daily player or a fresh visitor exploring our site, understanding these methods is vital for a secure play experience.

    The information acquisition method at spino gambino is crafted strictly to enhance your visitor journey and guarantee that our services function efficiently. We collect information such as system activity data and contact info only whenever required, ensuring that your identity is never exposed. We employ industry-standard encryption technologies to guard this data against unauthorized access or disclosure. This means that your actions on our platform remains private, permitting you to center entirely on the entertainment we provide.

    Openness is the foundation of the Spino Gambino company. We not ever share, market, or rent your personal information to external parties for marketing intentions lacking your direct permission. Every step of our data handling routine is consistent with modern digital confidentiality rules, verifying that your privileges as a user are completely respected. If you ever have questions concerning the way your info is managed, our comprehensive confidentiality policy page provides a complete overview of your rights, incorporating the option to ask for entry to your details or submit a request for its deletion from our databases.

    By picking spino gambino, you are selecting for a play environment that prizes ethics. We continually update our security protocols to fight upcoming online risks, providing you with a dependable and stress-free zone to savor your top games. We encourage all user to examine our confidentiality rules regularly to stay current about all changes to our practices. Your serenity is what motivates us to uphold the highest benchmarks of data security in the sector today.

  10. В этой публикации мы исследуем ключевые аспекты здоровья, включая влияние образа жизни на благополучие. Читатели узнают о важности правильного питания, физической активности и психического здоровья. Мы предоставим практические советы и рекомендации для поддержания здоровья и развития профилактических подходов.
    Получить полную информацию – [url=https://new-narkolog.ru/stati/programmy-gosudarstvennoy-podderzhki-dlya-vyzdoravlivayuschih-zavisimyh/]наркология стационар[/url]

댓글 달기

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