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”의 79,949개의 댓글

  1. spinogambino-Thouppy

    Ao analisar as plataformas de apostas online, a transparencia e um fator fundamental para garantir uma experiencia segura e justa para os utilizadores [url=https://spinogambino-casino.com.pt/termos-e-condicoes]spinogambino[/url] . O site spinogambino casino, disponivel atraves do endereco que hospeda os seus Termos e Condicoes, estabelece regras claras que regem a relacao entre a casa e os seus utilizadores. Compreender estes documentos e um passo crucial antes de iniciar qualquer experiencia de apostas, pois eles definem as regras do jogo, os procedimentos de levantamento de fundos e as politicas de bonus aplicaveis.

    Ao navegar pelas paginas do spino gambino, nota-se um esforco constante em manter um ambiente seguro. Os Termos e Condicoes detalham, por exemplo, os requisitos de aposta que devem ser cumpridos para que os ganhos obtidos atraves de promocoes possam ser efetivamente resgatados. Alem disso, o regulamento aborda questoes importantes de seguranca, como a verificacao de identidade, o combate a fraude e a promocao do jogo responsavel, garantindo que o spinogambino funcione dentro das melhores praticas do setor.

    Muitos utilizadores do spino gambino muitas vezes ignoram esta seccao por parecer densa, mas a leitura atenta destes termos evita problemas futuros. O documento esclarece as limitacoes de responsabilidade da plataforma, bem como os direitos dos jogadores em caso de disputas ou problemas tecnicos. Esta clareza e um indicio de confianca que diferencia o spinogambino de operadoras menos confiaveis no mercado de casino online.

    Se e um utilizador frequente ou esta a planear registar-se, recomendamos que reserve alguns minutos para ler a pagina oficial de Termos e Condicoes do spino gambino. Estar bem informado nao so protege o seu capital, como tambem permite que desfrute de todas as funcionalidades e entretenimento oferecido pela plataforma com paz de espirito. Ao cumprir as normas estabelecidas, garante uma utilizacao otimizada de todos os servicos que o spinogambino disponibiliza aos seus membros, proporcionando uma experiencia de jogo equilibrada e divertida para todos os perfis de entusiastas de apostas desportivas e de casino.

  2. needforslotsbonus-unlania

    At NeedForSlots, we prioritize the safety of your private data as part of our commitment to providing a secure and transparent gaming environment [url=https://needforslotsbonus.net/privacy-policy]NeedForSlots[/url] . We realize that when you access need for slots, you want to be assured that your data is handled with the utmost degree of attention. Our privacy policy is created to detail exactly how we collect, use, and protect the information you share with us while navigating our site.

    When you use NeedForSlots, we may collect specific information to boost your browsing experience and guarantee the functionality of our services. This includes technical data such as your IP address, browser type, and details about how you interact with our site. We use this data to optimize the efficiency of need for slots, ensuring that you receive the most relevant information and a seamless browsing experience. We do not trade your personal data to external entities, as your trust is the cornerstone of our platform.

    We implement stringent safety protocols to prevent unauthorized access, alteration, or disclosure of your data. While no internet-based platform can guarantee perfect safety, we continuously update our standards to meet best practices. By using NeedForSlots, you are agreeing to the policies detailed in our policy. We advise all visitors to review these terms periodically to stay informed about how we handle your data.

    If you ever have queries about our privacy practices, don’t hesitate to reach out to our dedicated customer service. Whether you are looking for the newest game reviews or simply exploring what need for slots has to provide, your privacy remains our top priority. Our objective is to foster an atmosphere where you can concentrate on the fun and thrill of gaming without stressing over your digital footprint. We appreciate you choosing NeedForSlots your preferred destination for information, and we remain dedicated to maintaining the honesty that you expect while you enjoy your visit to our website.

  3. Falls ihr auf der Suche nach einem umfassenden Uberblick hinsichtlich virtueller Spielhallen seid, ist die Webseite spino-gambinobewertung.com.de die ideale Anlaufstelle [url=https://spino-gambinobewertung.com.de]spinogambino[/url] . Etliche User hierzulande fragen sich, ob die Webseite zuverlassig sowie legal agiert. An dieser Stelle greift unsere detaillierte spino gambino review ins Spiel, die jeden relevanten Bereich unter die Lupe nimmt. Ein Nutzer, welcher spino gambino casino online entschlie?t, ersehnt eine gerechte Gaming-Erfahrung nebst prompten Geldtransfers erleben. Innerhalb unserer Seite analysieren wir das gesamte Angebot, damit Sie fundierte Entscheidungen erhalten. Das spinogambino casino konnte sich auf dem Sektor schon fest etabliert, allerdings eine objektive Bewertung ist zwingend erforderlich. Bei unserer Analyse durchleuchten wir nicht nur die Spielauswahl, sondern auch den Kundensupport und die Bonusbedingungen. Viele Nutzer suchen speziell nach hiesigen Fakten, um sicherzugehen, dass die Seite fur Zocker aus dem Bundesgebiet eingerichtet wurde. Egal, ob man nach einem virtuellen Abenteuer fahndet oder ob man sich hinsichtlich der Einzahlungsoptionen erkundigen wollt, unser Portal offeriert Klarheit. Der Anbieter spinogambino besticht haufig durch eine benutzerfreundliche Oberflache sowie einem riesigen Arsenal an Slots. Dennoch sollte man bevor man sich anmeldet jederzeit einen Kontrollblick auf unsere Einschatzung riskieren. Wir prufen den Betreiber ganz genau, um Ihnen echte Einblicke zu liefern. Die Plattform spino-gambino-casino de stellt fur etliche Zocker den Favoriten, doch existieren Einzelheiten, welche relevant sind. Wenn Sie den Bericht betrachtet, gewinnt man mehr Wissen hinsichtlich der Glucksspiellizenz sowie die Schutzma?nahmen. Abschlie?end kann man festhalten, dass eine grundliche Recherche betreffend den Anbieter der erste Schritt fur seriosen Spielspa? ist. Besuchen Sie unsere Webseite, um jedes Detail uber spinogambino zu erfahren und optimal vorbereitet loszulegen. Wir helfen Ihnen dabei, die Pro- und Contra-Argumente dieser Plattform zu durchschauen, damit Sie wahrend des nachsten Aufenthalts auf der Seite genau wissen, was wichtig ist. Erkundigt euch jetzt detailliert hinsichtlich des Casinos, um negative Erfahrungen zu vermeiden und sicher zu spielen.

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

  5. А сам не спит ночами и ни с кем не разговаривает. Уговорить поехать в клинику не получается. Платный психиатр на дом — И объясняет, что делать дальше. Сначала снимают острое состояние. Психиатр на дом Москва — работает и для взрослых. Советую глянуть источник: платный психиатр на дом [url=https://psikhiatr-na-dom-v-moskve-ujm.ru]платный психиатр на дом[/url] Там и про услуги психиатра на дому в Москве. Иногда один визит решает всё.

  6. Этот текст посвящён сложным аспектам зависимости и её влиянию на жизнь человека. Мы обсудим психологические, физические и социальные последствия зависимого поведения, а также важность своевременного обращения за помощью.
    Кликни, не пожалеешь – [url=https://samaya-schastlivaya.ru/kapelnicza-ot-pohmelya-v-borisoglebske-spasenie-ot-utrennej-toski/]delta clinic ru борисоглебск[/url]

  7. needforslotsbonus-abatHy

    On NeedForSlots, we believe that online gaming should consistently remain an entertaining hobby instead of a financial burden [url=https://needforslotsbonus.net/responsible-gambling]NeedForSlots[/url] . When you visit the NeedForSlots platform, you will quickly notice our devotion to transparency and player protection. Our responsible gambling page is a vital resource for anyone aiming to enjoy their favorite games while maintaining full control over their habits. The need for slots enthusiasts to keep track about their betting behavior has never been more important, and we are committed to providing the tools necessary for a safe experience.

    Managing your time and money is the cornerstone of a sustainable gaming journey. At NeedForSlots, we advise all our users to set strict deposit limits and follow a set budget before they even begin playing. It is important to remember that slots are games of chance, and they should never be considered a way to make money or solve financial problems. If you ever feel that your involvement with the need for slots games is becoming excessive, we provide helpful advice on how to implement self-exclusion measures or take cooling-off periods to regain control.

    Beyond the technical tools we offer, we highlight the importance of awareness. We provide links to independent organizations that focus on gambling support and counseling, making sure professional help is always within reach for those who may need it. Protecting our community is our top priority, and we aim to create an environment where fun and responsibility go hand in hand. By gaming through NeedForSlots, you are joining a community that prioritizes your well-being above everything else. Always remember that the need for slots enjoyment must be combined with the need for personal accountability. Keep your gaming sessions short, prioritize the entertainment value, and contact our support team if you feel that your habits are drifting away from a healthy, recreational activity. Your safety is our mandate, and we are here to support your journey every step of the way.

  8. Falls Sie auf der Jagd nach einer fundierten Analyse fur das Spino Gambino Casino schauen, ist die Webseite spino-gambino-bewertung.com.de die ideale Anlaufstelle [url=https://spino-gambino-bewertung.com.de]spino gambino casino online[/url] . In einer Branche, in der laufend neue Online-Spielotheken auf den Markt kommen, ist es fur Spieler in Deutschland wichtig, sachliche Informationen zu aufspuren. Unsere Prasenz widmet sich der ausfuhrlichen Untersuchung, ob das Spino Gambino Casino Ihre Aufmerksamkeit und Ihr Vertrauen verdient. Wir durchleuchten in unserem Spino Gambino Review jegliche relevanten Aspekte, von der Spielauswahl bis hin zum Service-Team. Etliche Besucher recherchieren spezifisch nach Erfahrungen zu Spinogambino, um zu prufen, dass Ein- und Auszahlungen reibungslos ablaufen. Mit unserem Spinogambino Casino Review liefern wir Ihnen eine transparente Einschatzung, die auf wahren Fakten fu?t. Dabei bewerten wir bei der Analyse von Spino Gambino Deutschland hauptsachlich die Lizenzierung und die Seriositat der Plattform. Ein gutes Spinogambino Online Casino sollte nicht nur durch ein breites Portfolio an Slots glanzen, sondern auch faire Bonusbedingungen fur Erstspieler bereithalten. Auf spino-gambino-bewertung.com.de finden Sie samtliche wichtigen Details, um sich ein personliches Bild vom Spino Gambino Casino Online zu machen. Wir kennen, wie wichtig Transparenz fur Spieler bei der Wahl ihres bevorzugten Anbieters ist. Egal ob Sie sich fur die allgemeinen Funktionen beim Casino Spino Gambino interessieren oder gezielte Fragen zu den Zahlungsmethoden bei Spino-Gambino-Casino de aufwerfen, unsere Expertenberichte behandeln alles ab. Wollen Sie nach dem optimalsten Weg, um sicher bei Spinogambino Deutschland zu agieren? Dann konsultieren Sie unseren detaillierten Spinogambino Review. Unser Vorsatz ist es, Ihnen bei der Suche zu helfen, damit Sie bei Casino Spinogambino eine kurzweilige und sichere Spielerfahrung verbringen konnen. Bauen Sie auf unsere Expertise und bekommen Sie alles, was Sie uber Spinogambino lernen mussen, bevor Sie Ihre anfangliche Einzahlung tatigen. Steuern Sie unsere Seite fur die neueste Analyse und sehen Sie, warum diverse Spieler bei der Entscheidung ihres frischen Favoriten auf unseren neutralen Spino Gambino Testbericht vertrauen.

  9. Если в момент обращения сохраняются абстинентные симптомы, сначала проводится детоксикация и нормализация сна. Лишь после стабилизации обсуждаются методики кодирования.
    Детальнее – [url=https://kodirovanie-ot-alkogolizma-v-spb16.ru/]кодирование от алкоголизма анонимно[/url]

댓글 달기

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