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,771개의 댓글

  1. В этой публикации мы исследуем ключевые аспекты здоровья, включая влияние образа жизни на благополучие. Читатели узнают о важности правильного питания, физической активности и психического здоровья. Мы предоставим практические советы и рекомендации для поддержания здоровья и развития профилактических подходов.
    Погрузиться в детали – [url=https://formula-clinic.ru/stati/alkohol-agressiya-poterya-kontrolya.html]наркология клиника[/url]

  2. Этот информационный материал подробно освещает проблему наркозависимости, ее причины и последствия. Мы предлагаем информацию о методах лечения, профилактики и поддерживающих программах. Цель статьи — повысить осведомленность и продвигать идеи о необходимости борьбы с зависимостями.
    Откройте для себя больше – [url=https://formula-clinic.ru/stati/kak-vesti-sebya-s-zavisimym-chelovekom-chtoby-pomoch-brosit.html]наркология[/url]

  3. Эта публикация обращает внимание на важность профилактики зависимостей. Мы обсудим, как осведомленность и образование могут помочь в предотвращении возникновения зависимости. Читатели смогут ознакомиться с полезными советами и ресурсами, которые способствуют здоровому образу жизни.
    Что ещё нужно знать? – [url=https://boilervdom.ru/zdorove/narkologicheskij-vyvod-iz-zapoya.html]доктор вывод из запоя[/url]

  4. spinogambino-crobe

    Within the gaming hub, our team believe regarding any excitement of online gambling should forever remain offset by a dedication towards protection plus personal wellbeing. The portal is dedicated towards offering a engaging atmosphere, but we admit that for some users, gaming can develop becoming a hurdle. Our responsible gaming section at [url=https://spinogambino-casinogame.com/responsible-gaming]spino gambino[/url] serves being the cornerstone regarding the operations, guaranteeing that every customer possesses the tools and information necessary to maintain oversight over the experience.

    This the brand strategy towards responsible play commences with clarity plus learning. We provide thorough aids that assist participants identify the initial alert indicators regarding risky behavior. This is vital towards note where gaming must become viewed being the form regarding amusement rather versus a technique regarding creating money. Towards support the outlook, we present different user safety tools, such as self-assessment evaluations, deposit limits, and the power towards fix rest periods. By utilizing such options, the player may customize the session to suit within your own limits and temporal bounds.

    If one ever perceive that the engagement with spinogambino starts turning intense, our team strongly encourage users towards utilize benefit of our self-exclusion options. The actions allow individuals towards initiate a structured pause away the products, giving some necessary distance to restore perspective. Moreover, the company crew offers direct links towards independent bodies that excel in offering skilled assistance regarding individuals looking for advice regarding playing patterns.

    The safety is our top concern. By upholding the open dialogue regarding responsible gaming, we work towards hold our community safe plus fun regarding each person participating. We invite players to check our specific guidelines section towards review such tools in detail. Strength through data is a very effective way to guarantee where your period occupied with the brand remains a positive and enjoyable experience. Even you might be the casual player or a regular, knowing your limits is a key to a sustainable plus good relationship with online gaming. Stay educated, keep in command, plus relish the time carefully.

  5. ohmyspins4-apaks

    Jeder, einer auf der Suche nach dem innovativen und spannenden Online-Glucksspielanbieter ist, sollte ihm das oh my spins casino einmal naher betrachten [url=https://oh-my-spins-4.vercel.app]ohmyspins[/url] . Besagte Plattform hat sich am Markt schnell einen Namen gemacht, wodurch die detaillierte recensione ohmyspins vorwiegend fur Gamer aus der Schweiz interessant ist. Besagtes casino ohmyspins uberzeugt dank eines gro?es Portfolio von Spielautomaten, Tischspielen und einem hochwertigen Live-Casino-Bereich. Wer, der auf der Suche nach authentischen oh my spins erfahrungen aus ist, durfte prompt bemerken, dass dieser Auftritt teils in Bezug auf die Benutzerfreundlichkeit sowie bei der Game-Auswahl rundum uberzeugt.

    Extrem bedeutend bezuglich alle Spieler ist eine Sicherheit bei finanziellen Transaktionen. In zahlreichen oh my spins casino recensioni wird hervorgehoben, dass eine ohmyspins auszahlung schnell zudem reibungslos erfolgt. Dies generiert Vertrauen sowie garantiert dafur, dass die Nutzer voll auf die Games fokussieren durfen. Ein Pluspunkt bezuglich ohmyspins gelten solche stetig bereitgestellten Bonusaktionen sowie Freispiele, die den Einstieg erleichtern und den Spielspa? ma?geblich erhohen.

    Dieses Design des oh my spins ist intuitiv gestaltet, sodass die teils Neulinge wie Profis direkt orientieren. Wenn man solche ohmyspins erfahrungen in diversen Foren betrachtet, wird oft dieses versierte Support-Team gelobt, das bei Fragen hinsichtlich die ohmyspins Konto beziehungsweise zu Bonusbedingungen stets weiterhilft. Unabhangig davon, ob der User per Desktop bzw. mobil spielt, eine softwareseitige Performance ist bestandig zudem liefert ein perfektes Erlebnis.

    Zusammenfassend lasst sich sagen, dass dieses ohmyspins casino eine gro?artige Option bei Gamer ist, die Fokus auf Seriositat und ein vielfaltiges Portfolio haben. Dieses Portal verbindet eine moderne Software mit einer gerechten Spielumgebung. Wenn Sie demnach ein anderes Abenteuer bevorzugen, ist oh my spins absolut einen Besuch wert. Gonnen Sie ein Auge auf solche Angebote sowie formen Sie euch Ihre eigene Meinung bezuglich dieses aufregende Portal. Eine Mischung von lukrativen Gewinnchancen und einer sicheren Spielumgebung gestaltet dieses oh my spins casino zu einer festen Gro?e bei jeden, welche erstklassige Casino-Unterhaltung bevorzugen.

  6. chicken-Shierce

    Un aplicación de bolsillo entre los pasados períodos es un fenómeno, con mayor énfasis en el mercado hispano, donde su accesibilidad y adictiva mecánica han ganado a cientos usuarios [url=https://chicken-road-es-56.kakanurhidayat91.workers.dev]Juego De Chicken Road Opiniones[/url] .

    Sin embargo antes de iniciarte en dicho espacio de carreras con pollo, es fundamental conocer las valoraciones verídicas de los usuarios ya lo han jugado. En plataformas como comunidades digitales, los usuarios suelen compartir opiniones diversas sobre *Chicken Road opiniones*, señalando tanto sus facetas buenos como sus probables inconvenientes.

    Uno punto entre los destacados por los usuarios es la sencillez del aplicación. Su formato directo y su interactividad fácil lo posiciona recomendable para los usuarios que buscan diversión breve omitiendo problemas. Muchos participantes en *Juego Chicken Road opiniones* resaltan que es recomendable para ocupar el intervalo en rutas o en medio de momentos libres, debido a su estructura de sesiones rápidas y enganchosas. Asimismo, la plataforma en hispano es muy participativa, lo que mejora la interacción y el transmisión de consejos, un elemento que consolida la experiencia en *Valoraciones de Chicken Road en castellano*.

    No no todo elogios. Algunos aficionados en *Experiencias con Chicken Road en el territorio español* señalan que el entertainment puede terminar aburrido con durante el período, especialmente al lograr etapas elevados. También hay comentarios sobre la compra, donde ciertos componentes clave solo son disponibles por transacciones dentro de la aplicación, lo que genera discusión sobre si *¿Es recomendable Chicken Road?* para los interesados que evitan excluir gastar capital. En *Experiencias genuinas con Chicken Road*, algunos usuarios advierten sobre la atracción que puede producir, en particular en momentos empresariales o académicos, lo que podría afectar la productividad.

    Al te preguntes *a qué se dedica Chicken Road*, básicamente es un entertainment de pruebas con pollo como elementos clave, donde la celeridad y la planificación son fundamentales para vencer obstáculos y competir frente a diversos competidores. Su éxito depende en su unión de accesibilidad y competencia, no obstante como en cualquier aplicación gratuito, conviene investigar detalladamente con anterioridad de invertir horas o fondos. Las opiniones en *Críticas de The Chicken Road* suelen ser heterogéneas, pero la gran parte coincide en que compensa la pena experimentarlo una oportunidad para determinar si se ajusta a tus expectativas.

    En síntesis, en caso de que te encuentras revisando experimentar en *este juego*, consultar *valoraciones de Chicken Road* de otros usuarios te facilitará a desarrollar una percepción realista. Ya sea por ocio intermitente o por su red en castellano, el diversión presenta una experiencia incomparable, no obstante con sus aspectos que se sugiere revisar antes de adentrarse a *experimentar con Chicken Road*.

  7. Этот краткий обзор предлагает сжатую информацию из области медицины, включая ключевые факты и последние новости. Мы стремимся сделать информацию доступной и понятной для широкой аудитории, что позволит читателям оставаться в курсе актуальных событий в здравоохранении.
    Исследовать вопрос подробнее – [url=https://housefindr.ru/pages/narkologicheskuyu-pomosch-voronezh/]наркологический центр в воронеже[/url]

  8. Within Chicken Road, we emphasize the security and integrity of our gamers above all else [url=https://chicken-road-logincasino.com/privacy-policy]chicken road[/url] . Our specialized privacy policy page functions as a transparent roadmap on how we process, keep, and protect the sensitive records offered by our clients. Regardless of whether you are browsing the platform or playing your favorite games, comprehending how we process your input is crucial. We have designed our tools to guarantee that your time spent at Chickenroad continues to be equally pleasant and protected.

    Once you sign up for an account with us, we acquire precise data points required to verify your credentials and enable efficient dealings. This input features personal identifiers, communication info, and technical data gathered through small files to improve your surfing experience. Be confident that at Chicken Road, we utilize advanced coding methods to defend your private information from illegal entry. Our vow to data protection aligns with international regulations, confirming that your confidentiality is never compromised as you navigate the multiple opportunities accessible on our website.

    We want each player at Chickenroad to become confident and knowledgeable. Our privacy policy openly states that we do not release your secret records with outside entities for marketing objectives lacking your informed authorization. Furthermore, we grant you the authority to retrieve, modify, or request the wiping of your user records at any moment. By upholding tough administrative and technical safeguards, we cultivate a reliable environment where you can focus on the amusement supplied by our platform.

    If you might possess doubts pertaining to our security actions or how your input is treated, our help desk is forever accessible to give explanations. Confidence is the basis of the Chicken Road experience, and we continuously upgrade our practices to follow shifting tech defense patterns. By utilizing our services, you consent to the stipulations outlined in our policy, demonstrating our mutual goal of maintaining a reliable and honest play environment. We appreciate you picking Chickenroad as your top place for online enjoyment, where your confidentiality is constantly our top focus.

댓글 달기

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