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”의 75,014개의 댓글

  1. Врач спрашивает о длительности употребления, количестве алкоголя, наркотиков и предыдущем лечении. Клиника учитывает хронические болезни, психологические проблемы и готовность к терапии. Специалисты объясняют, какие подходы подходят и как строится лечение.
    Изучить вопрос подробнее – [url=https://narkologicheskaya-klinika-v-krasnoyarske22.ru/]наркологическая клиника лечение алкоголизма Красноярск[/url]

  2. kingmaker-vilia

    Si buscas una experiencia de juego de primer nivel, el casino Kingmaker se ha posicionado como una de las opciones mas atractivas en el mercado actual [url=https://kingmaker-casino-4.marvinewhickleyew756.workers.dev]kingmaker casino review[/url] . Este portal ofrece un gran surtido de tragamonedas, juegos de mesa y opciones con crupier en vivo que aseguran entretenimiento constante. En este analisis de Kingmaker casino analizamos los aspectos mas importantes de la plataforma, subrayando su interfaz intuitiva y su adaptabilidad a cualquier dispositivo, lo que permite a los jugadores acceder desde cualquier lugar sin complicaciones.

    Para empezar a gozar de todo lo que ofrece el sitio, el proceso de inicio de sesion en Kingmaker casino es muy facil. Solo necesitas registrarte una vez para obtener tus credenciales y acceder a tu cuenta personal. Muchos usuarios que buscan un casino en linea Kingmaker valoran especialmente la fluidez del sitio y la seguridad de las transacciones, factores en los que kingmakercasino ha invertido notablemente. Si ya posees una cuenta, el acceso a tu cuenta es inmediato, dandote entrada directa a las promociones exclusivas y al programa de lealtad.

    Al evaluar las resenas sobre Kingmaker casino, queda claro que la calidad de los proveedores de software es un punto fuerte. Casino kingmaker colabora con los estudios mas reconocidos de la industria, asegurando que cada giro y cada mano sean justos y emocionantes. Ya sea que prefieras la emocion de un King maker casino en vivo o la variedad de las maquinas modernas, esta web cumple con las expectativas de los jugadores mas exigentes.

    Si estas buscando un Kingmaker casino online confiable y lleno de bonificaciones, este sitio es una visita necesaria. La variedad de metodos de pago y la asistencia tecnica eficaz consolidan a Kingmaker como una opcion solida. No pierdas la oportunidad de descubrir todo lo que Kingmaker tiene para ofrecer hoy mismo. Registrate, aprovecha el acceso rapido a traves de tu inicio de sesion y comienza a disfrutar de la adrenalina de uno de los mejores sitios de juegos disponibles en la actualidad. Tu proxima gran victoria podria estar a solo un clic de distancia en esta plataforma de elite.

  3. Публикация посвящена жизненным историям людей, успешно справившихся с зависимостью. Мы покажем, что выход есть, и он начинается с первого шага — принятия проблемы и желания измениться.
    Как достичь результата? – [url=https://fixbuilders.ru/pages/neotlozhnyj-vyzov-narkologa-na-dom/]вызов нарколога на дом стоимость[/url]

  4. закладки меф закладки купить меф Мефедрон, Гашиш, Бошки, Альфа-ПВП трамадол капсулы купить где можно купить коноплю мефедрон телеграмм
    нарко каналы тг трамадол 50мг купить нарко тгhttps://pologikupit.xyz купить экстази бошки гашиш в турции купить экстази бошки гашиш в эмиратах

  5. spinogambino-Zoothen

    Decouvrir qui se cache derriere une plateforme de divertissement en ligne est une etape essentielle pour tout parieur soucieux de la fiabilite de son experience [url=https://spinogambino-bet.fr/a-propos-de-nous]spino gambino[/url] . Sur la page qui sommes-nous de spinogambino, la vision de la marque est clairement mise en avant afin d’etablir une relation de confiance durable avec sa clientele. En lisant cette section sur le site spino gambino, vous comprendrez rapidement que l’objectif principal est de proposer un environnement de jeu protege, transparent et surtout divertissant.

    La plateforme spinogambino s’est fixee comme objectif de transformer l’industrie du jeu en ligne en mettant le focus sur l’innovation et la satisfaction du joueur. L’equipe derriere spino gambino est constituee d’experts passionnes par les nouvelles technologies et le monde du jeu, travaillant sans relache pour offrir une interface ergonomique et intuitive. Que vous soyez un parieur chevronne ou un novice, la structure organisationnelle de spino gambino a ete pensee pour faciliter votre navigation et repondre a toutes vos exigences en matiere de jeux.

    L’un des piliers fondamentaux presentes sur la page a propos de spinogambino est le devouement envers le jeu responsable. La marque insiste sur le fait que le plaisir doit demeurer le moteur principal de chaque session. Ainsi, des outils de controle et de protection sont mis en place pour garantir que chaque utilisateur puisse profiter de l’offre de spino gambino en toute serenite. En choisissant cet operateur, vous optez pour une entite qui valorise l’ethique autant que la performance technique.

    En somme, en parcourant la section informative de spinogambino, vous decouvrirez une vision claire et prometteuse. La transparence est le mot d’ordre, garantissant que chaque joueur chez spino gambino puisse s’amuser dans des conditions optimales. N’hesitez pas a visiter cette rubrique pour mieux cerner l’identite de votre plateforme et profiter totalement des services et du catalogue exclusif proposes par les equipes devouees de cet acteur majeur du secteur.

  6. Публикация посвящена жизненным историям людей, успешно справившихся с зависимостью. Мы покажем, что выход есть, и он начинается с первого шага — принятия проблемы и желания измениться.
    Практические советы ждут тебя – [url=https://renobuilder.ru/pages/ekstrennyj-vyzov-narkologa-na-dom/]вызов частного врача нарколога на дом[/url]

  7. chickenroad-Diviorb

    In situația in care ești căutand unui parcurs ludic imersive, platforma chicken road parimatch reprezintă locația optimă destinată pasionații de sloturi online [url=https://chickenroad-review.ro/parimatch]chicken road cazino pari match[/url] . Acest titlu s-a transformat subit unul din cele mai apreciate jocuri in cadrul colecției furnizorului, punand la dispoziție membrilor autohtoni o aventură bogată in intensitate și șanse reale de caștig. Cand deschizi chickenroad joc pari match, vei descoperi o interfață inovatoare și elemente unice care transformă fiecare sesiune intr-un interval remarcabilă. Succesul acestui joc este motivată de regulile sale dinamice, reprezentand un centru principal in secțiunea chicken road cazino pari match.

    In cazul in care dorești să cercetezi lumea acestui joc, chicken road pari match cazino iți oferă toate resursele necesare pentru a profita de joc fără griji precum și confort. Poți porni chickenroad pari match joacă imediat folosind telefonul ori de pe desktop, bucurandu-te de o rulare impecabilă. Mulți utilizatori caută pari match chicken road pentru a testa variabilitatea titlului și pentru a ințelege mai clar pictogramele aducătoare de profit. Orice rundă de chicken road slot parimatch asigură șansa de a declanșa secvențe speciale fascinante.

    Un detaliu semnificativ pentru incepători reprezintă dreptul de a incerca chicken road parimatch fără costuri. Această variantă iți dă voie să te familiarizezi cu instrucțiunile evitand pierderea bugetul personal, fiind o metodă deosebită de a deprinde strategiile inainte de a avansa la mize reale. Fie că te consideri un parior veteran sau un incepător in cadrul acestui chickenroad joc de pariuri pari match, vei aprecia modul in care vizualul este concepută pentru a fi intuitivă. Nu rata oportunitatea de a testa chicken road pari match joc astăzi, valorificand promoțiile și promoțiile puse la dispoziție de site. Fiecare rotire ar putea fi cea caștigătoare, iarăși calitatea produsului furnizat de Pari Match garantează momente lungi de relaxare de inaltă clasă intr-un cadru sigur precum și licențiat. Inregistrează-te imediat și află de ce acest joc a cucerit deja comunitatea jucătorilor de pe plan local.

  8. instasino-Trerry

    Verlangt u betreffende een nieuwe en intrigerende manier om uw favoriete spellen te gokken? Hierdoor is het nodig fase om te ontdekken instasino [url=https://instasino-5.onrender.com]instasino casino review[/url] . Het netwerk is hedendaags enorm bekend geëvolueerd tussen deelnemers die hopen op een degelijke en toegankelijke speelomgeving. In deze gedetailleerde instasino review analyseren we scherper in waarom bovengenoemd netwerk zo bijzonder oogt en gezien aldoor meer spelers kiezen voor de beleving van het instasino casino.

    Indien u voor het eerst arriveert op de pagina, zult u zien dat de besturing uitermate logisch is. Het instasino casino nederland levert een breed scala aan games, variërend van nostalgische automaten tot actuele live dealer spellen die waarborgen een natuurlijke beleving. Of u nu u een doorgewinterde speler bent of net debuuteert in het verkennen van de omgeving van instasino online, de layout is dermate gecreëerd dat u gemakkelijk uw weg ontdekt naar uw gekozen spellen.

    Een essentieel punt voor veel spelers is de betrouwbaarheid en het gebruiksvriendelijkheid. De instasino login procedure is eenvoudig en versleuteld, waarmee u vlug en exclusief zorgen aan de start kunt. Wanneer u jagt op een casino instasino dat vaart combineert met een uitgebreid aanbod, inderdaad bent u hier op de juiste plek. Conform onze instasino casino review volgt dat het portaal uitstekend werkt op het vlak van responstijden en smartphone gebruik. Voor de gokkers uit de streek is instasino nl een superieure beslissing, daar het vlekkeloos past bij de verlangens van de binnenlandse markt.

    Het aanbod aan bonussen maakt het instasino casino online extra verleidelijker. Constante updates en recent toegevoegde entertainment zorgen ervoor dat de ervaring levendig voortduurt. Of u nu u onderweg gokt of thuis achter uw laptop zit, instasino berekent steeds een superieure sensatie. Verlangt u er naar om te weten wat instasino voor u kan betekenen? Meld u aan nu en proef persoonlijk gezien zoveel gebruikers opteren voor dat domein. Met de optimale concentratie op vermaak en veiligheid blijft presteren instasino een favoriet voor alle gepassioneerde casinoliefhebber.

  9. Neospin Casino is a popular online gaming title that has gained considerable focus among players hunting for thrilling and profitable playing ventures [url=https://neo-spin-16.lorenz5o3jl8o7van8o07vic.workers.dev]neospin[/url] . Whether you’re scouting for Neospin online or seeking a NeoSpin analysis, this gaming game stands out for its cutting-edge features and top-tier gameplay.

    Known for its seamless systems and attractive bonuses, Neospin Casino has evolved into a favourite among both casual and seasoned players.

    When investigating Neospin online choices, it’s crucial to grasp what makes this game distinct. Unlike classic slot machines, Neospin often includes dynamic components, such as falling spinning wheels and bonus rounds, which boost the overall entertainment worth. Players who are fresh to the title might find a Neospin critique especially helpful in learning its top features, payout percentages, and how to maximise their odds of winning.

    For those hunting to play Neospin online, picking a trustworthy platform is key. Many Neospin gaming sites offer this title alongside other trending games, delivering a effortless gaming experience. Before beginning, checking NeoSpin casino critiques can help players in choosing a honest site with fair chances and safe payment methods. Honesty in play systems and responsible playing policies are critical elements to assess when evaluating an digital casino.

    Whether you’re interested about Neospin Casino or already a fan, grasping its systems and benefits can enhance your gaming experience. With its thrilling layout and frequent promotions, Neospin digital games continue to entice players looking both entertainment and possible rewards. Consistently confirm you gamble responsibly and select sites that prioritise player security and fair play practices.

  10. Капельница — основной метод дезинтоксикации при запое. Она позволяет быстро восполнить дефицит жидкости и электролитов, вывести токсины и улучшить общее самочувствие. В состав инфузии входят препараты, нормализующие обмен веществ, а также витамины и гепатопротекторы. Процедура проводится под контролем врача, что гарантирует безопасность и точную дозировку лекарств.
    Углубиться в тему – http://vyvod-iz-zapoya-v-rostove-na-donu16.ru/vyvedenie-iz-zapoya-rostov-na-donu/

댓글 달기

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