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”의 74,991개의 댓글

  1. instasino-cathy

    Zoek naar een verse plek om op internet te gokken, dan is de kans enorm dat je de naam instasino bent opgemerkt [url=https://instasino-3.pages.dev]instasino review[/url] . In deze instasino review duiken we dieper in op hetgeen dit domein te aanbiedt voor deelnemers in Nederland. Regelmatig kiezen meer enthousiastelingen voor instasino casino omdat het een naadloze ontmoeting biedt voor inclusief nieuwe als doorgewinterde spelers. Wanneer je de website bekijkt, valt onverwijld op dat het design gestroomlijnd en gebruiksvriendelijk is, wat maakt dat de instasino login vlug en zonder obstakels gebeurt.

    Diverse deelnemers in de streek informeren zich af wat de voordelen zijn van het spelen bij instasino casino Nederland. Een belangrijk pluspunt is het uitgebreide palet aan spellen. Of je nu houdt van ouderwetse gokkasten, spannende tafelspellen of de meeslepende ervaring van een live casino, casino instasino heeft voor ieder wat wils. Middels de geavanceerde innovatie achter instasino casino online is de wachttijd van spellen verwaarloosbaar, wat zorgt voor een ongestoorde speelervaring.

    Daarnaast is veiligheid natuurlijk een cruciaal segment van elke instasino casino review. Het platform hanteert nauwkeurige protocollen om ervoor te zorgen dat jouw informatie en transacties veilig zijn. Voor regionale spelers die op zoek zijn naar een veilige platform, is instasino nl een geweldige keuze. Het aanbod wordt regelmatig geüpdatet, waardoor je constant toegang hebt tot de nieuwste titels in de industrie van instasino online.

    Kortom, wie op zoek is naar een gevarieerd en toegankelijk domein, moet zeker eens een kijkje nemen bij dit casino. Het is simpel om een registratie aan te maken en te beginnen met spelen. Of je nu op je desktop of smartphone speelt, de kwaliteit houdt constant hoog. Het is dan ook niet vreemd dat steeds meer mensen kiezen voor de spelopties die dit casino biedt. Ben jij er voorbereid voor om het assortiment persoonlijk te verkennen en te zien wat er voor jou in petto ligt bij deze bekende spelsite? Verken het vandaag nog zelf en ervaar waarom zoveel spelers zich al hebben geregistreerd.

  2. Москва отличается высокой плотностью районов и большой территорией, поэтому время прибытия зависит от адреса, ситуации на дорогах и выезда за пределы МКАД. Вызвать врача на дому можно по телефону или через заявку. Оператор уточнит категорию услуги, подберет оптимальное время и сообщит предварительные цены. Приоритетом остается безопасность: если больному нужна специализированная диагностика, постоянное мониторирование или экстренная помощь, специалист рекомендует обратиться в клинику или вызвать скорую.
    Получить больше информации – [url=https://nadomu1.kapelnica-ot-zapoya-v-moskve14-1.ru/]вызов капельницы на дом[/url]

  3. spinogambinobet-shaft

    Conheca o universo da Spinogambino, uma casa de apostas que se evidencia no mercado de apostas online pela sua determinacao em oferecer uma experiencia integral e segura aos seus jogadores [url=https://spinogambinobet.com.pt/sobre-nos]spino gambino[/url] . Ao entrar na seccao sobre nos do site oficial, e possivel perceber o empenho da marca em aumentar os criterios do jogo online. A visao da marca vai muito alem do simples ato de jogar; o objetivo e desenvolver um espaco onde a inovacao, a transparencia e a diversao se alinham de forma harmoniosa.

    A marca Spino Gambino sente orgulho de ter uma arquitetura robusta, criada para garantir que cada jogador tenha acesso a recursos de vanguarda. Desde a variedade de mercados oferecidos ate a qualidade do suporte ao cliente, cada detalhe foi minuciosamente preparado para satisfazer as exigencias do publico portugues. A transparencia e um dos pilares centrais da Spinogambino, garantindo que todas as regulamentos e leis sejam seguidos rigorosamente para proteger os informacoes e os depositos dos seus membros.

    Ao optar pela Spino Gambino, os entusiastas de apostas encontram um aliado que valoriza a evolucao constante. O site nao e apenas uma plataforma de jogo, mas uma comunidade onde a protecao e prioridade maxima. A equipe por tras do servico labora incansavelmente para integrar as cotas mais atrativas e os mercados mais dinamicos, sempre com um olhar atento nas novidades globais do mercado.

    Se busca uma experiencia de jogo genuina e confiavel em Portugal, a Spinogambino revela-se como uma opcao fiavel. A trajetoria desta casa e marcada pela seriedade e pelo desejo constante de exceder as expectativas dos seus utilizadores. Quer seja atraves da usabilidade no site ou pela rapidez do suporte, a Spino Gambino demonstra que e possivel unir diversao responsavel com um atendimento de qualidade. Conhecer a historia e os valores da marca e o primeiro passo para desfrutar de tudo o que esta plataforma tem para oferecer no vibrante mundo das apostas online.

  4. An emerging is an emerging name in the online gambling scene, especially within the sphere of cutting-edge gaming platforms [url=https://neo-spin-15.onrender.com]neo spin casino[/url] . As a innovative gaming platform, neospin online of neospin delivers enthusiasts a fusion of ease of use and engagement, making it the subject of attention for those discovering fresh neospin casino options. Whether you’re a seasoned gambler or a newcomer, knowing the nuances of neospin can help you assess if it’s the right choice for your betting preferences.

    One of the highlights of neospin is its intuitive interface, crafted to appeal to all occasional and hardcore enthusiasts. The hub appears to prioritize on ease, ensuring that navigation is seamless and intuitive. For people creating a neospin analysis, this convenience is often the major selling aspect, most for people who enjoy a hassle-free betting journey. The platform’s focus on ease of operation fits well with this increasing need for online choices that don’t require extensive technical expertise.

    Another key point of neospin online is its array of titles. While particular details may change, many enthusiasts appreciate the diversity on offer on such sites, which usually includes slot games, live options, and live dealer options. A thorough online review would probably focus on the range of choices, ensuring that players can discover something that matches their tastes. The adding of popular titles can also win over players looking for familiar and exciting gameplay.

    Security and transparency are vital considerations when assessing any neospin casino platform. Gamblers writing a neospin evaluation would logically seek for confirmation that their transactions and personal information are protected. Established sites often employ encryption methods and certified operators to ensure a safe playing space. While this emerging platform hasn’t been widely discussed in mainstream evaluations, its appearance on platforms like alternative digital hubs indicates an drive to offer the seamless online experience.

    For individuals considering this, it’s valuable to mention that the site may appeal those looking a straightforward approach to online betting. The lack of extensive marketing material on the site itself means that gamblers must rely on external digital betting review platforms to collect comprehensive insights. This clarity can be simultaneously the plus and the limitation—it enables for a fair evaluation but may also result in scarce ready-made promotional claims.

    In final analysis, This emerging platform represents a modern approach on online playing, combining simplicity with convenience. Whether you’re hunting for a quick wager or the more thorough exploration into the platform’s offerings, knowing its advantages and drawbacks through the neospin analysis can guide you formulate a well-thought-out judgment. As the online betting environment goes on, hubs like neospin play a part in increasing the choices on offer to enthusiasts seeking the dependable and pleasurable session.

  5. Verken je op zoek naar de ultieme entertainment in de sector van kansspelen? Dan ben je beslist al vertrouwd met de opkomst van Plinko. Dit gegeerde spel, dat zijn herkomst vindt in beroemde spelshows, heeft de aandacht van talloze gokkers gepakt wegens zijn nuchterheid en spannende dynamiek. Indien je streeft naar een degelijke plek om van dit spel te profiteren, is [url=https://plinko-game-82.vercel.app]Plinko demo[/url] het opperbeste oord voor iedere fan van Plinko Belgie.

    Het mechanisme is even eenvoudig als verslavend. Je laat een balletje glippen vanuit de top van een driehoekig bord met pinnen en bespiedt hoe het bolletje naar laag hupt zolang het in een van de boxen onderaan terechtkomt. Elke actie leidt voor opwinding, want je nimmer accuraat weet waar de bal zal stoppen. Voor starters is het ten zeerste geadviseerd om te starten met een Plinko demo. Door de proefversie te gebruiken, kun je geen inzet de werking van het spel doorgronden, de diverse inzetten onderzoeken en achterhalen hoe de vermenigvuldigers presteren. Het is de optimale manier om bekend te raken met de interface eer je met echt geld aan de slag gaat.

    Veel deelnemers afvragen zich af of er een aparte plinko app nodig is om optimaal te kunnen inzetten. Het belangrijke troef van dit webstek is dat het verfijnd is voor navigatie in de browser op allerlei toestellen. Of je nu op je desktop werkt of liever mobiel bent met je smartphone, de beleving blijft behouden soepel en snel. Je hebt derhalve nul zware plinko app verplicht om te genieten van een stabiele en vlotte spelomgeving.

    Ga naar https://plinko-game-82.vercel.app en proef eigenhandig om welke reden Plinko momenteel een van de uiterst favoriete selecties is in de Vlaamse online speelwereld. Het eenvoudige ontwerp draagt zorg ervoor je onverwijld naar de beleving kunt vrij van storingen. Starten heden nog, check je geluk met de demo en ontdek of jij de perfecte tactiek kunt bedenken om de grootste multipliers te scoren. Veel succes met het deelnemen van Plinko.

  6. Вызов нарколога особенно актуален, если человек употребляет спиртное несколько дней подряд, испытывает выраженное похмелье или не может самостоятельно прекратить запой. Если проблемы продолжаются несколько лет, лечение алкоголизма требует последовательного подхода. Врач на дому оценивает жалобы и решает, допустимо ли лечение дома либо требуется стационарное лечение.
    Дополнительная информация – [url=https://narcolog-na-dom-krasnoyarsk1.ru/]http://narcolog-na-dom-krasnoyarsk1.ru[/url]

  7. Каждый пациент проходит последовательный процесс лечения, где основное внимание уделяется безопасности, контролю состояния и постепенной адаптации. При поступлении проводится диагностика с оценкой степени зависимости, сопутствующих патологий и психологических факторов, влияющих на развитие заболевания. На основании полученных данных формируется персонализированный план терапии, включающий медикаментозные и немедикаментозные методы.
    Исследовать вопрос подробнее – [url=https://narkologicheskaya-klinika-v-spb16.ru/]наркологическая клиника нарколог в санкт-петербурге[/url]

  8. И началась такая ломка, что вызвали врача. Трясло, давление скакало. Вывод из запоя на дому — И снимает это состояние. И человеку реально становится легче. Анонимный вывод из запоя на дому — Без осуждения и лишних вопросов. Можете ознакомиться по ссылке: вывод из запоя москва [url=https://kapelnica.vyvod-iz-zapoya-na-domu-msk-wtk.ru]вывод из запоя москва[/url] Там и про вывод из запоя цены по Москве. Обращайтесь к специалистам.

  9. Нужен врач и капельница под контролем. Голова чугунная, руки трясутся. Вывод из запоя на дому — это когда врач приезжает сам. Потом возвращаются силы. Анонимный вывод из запоя на дому — Без лишних вопросов. Советую глянуть источник: вывод из запоя дешево [url=https://pohmelye.vyvod-iz-zapoya-na-domu-msk-wtk.ru]https://pohmelye.vyvod-iz-zapoya-na-domu-msk-wtk.ru[/url] И про то, как прокапаться на дому в Москве. Обращайтесь к специалистам.

  10. chickenroad-exceli

    Daca esti cautand unei aventuri gastronomice veritabile, unde gustul carnii de pasare gatit la perfectie domina, in acest caz ai ajuns chiar unde trebuie [url=https://chickenroad-review.ro/despre-noi]chicken road[/url] . Portalul chickenroad-review.ro a fost creat ca urmare a interesului pentru mancare buna si din dorinta de a prezenta publicului o perspectiva sincera si bine fundamentata asupra ofertele culinare de la Chicken Road. Am decis sa devenim ghidul tau de incredere in universul aromelor, analizand cu atentie toate aspectele care face ca acest brand culinar sa devina atat de cautat de pofticiosi.

    Relatarea din spatele platformei noastre este elementara si clară. Am intentionat sa punem bazele o platformă unde fanii brandului Chicken Road pot gasi informatii utile, recenzii obiective si noutati privind meniul lor diversificat. Recunoastem ca timpul tau este pretios, de aceea ne-am propus misiunea de a verifica si a examina constant meniurile pentru ca tu sa cunoști exact ce să anticipezi atunci cand comanzi sau treci pragul un punct de lucru. Grupul nostru monitorizeaza toate detaliile, de la prospetimea ingredientelor si pana la nivelul deservirii, asigurand astfel o viziune de ansamblu asupra exigențelor inalte pe care acest nume le pune in practică.

    Nu suntem doar un simplu site de opinii, ci un grup alcătuită din persoane ce valorizează excelența si aromele produselor pe bază de pui gătite in baza unor rețete atent selectionate. Fie ca te declari un admirator al aripioarelor crispy ori optezi pentru opțiunile dietetice si gatite lent, pe chickenroad-review.ro vei descoperi asistența completă pentru a face o opțiune alimentară optimă. Incurajam deschiderea si incurajam consumatorii sa expună propriile impresii, deoarece consideram ca feedback-ul real este factorul care susține o afacere sa progreseze. Te invitam sa vizitezi rubricile noastre pentru a afla de ce chicken road a ajuns un nume de referință in peisajul gastronomic local. Ne păstrăm angajamentul țintei noastre primare: să reprezentăm cea mai de incredere sursa de informare pentru oricine caută experiente delicioase alaturi de Chicken Road.

댓글 달기

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