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

  1. Эта статья подробно расскажет о процессе выздоровления, который включает в себя эмоциональную, физическую и психологическую реабилитацию. Мы обсуждаем значимость поддержки и наличие профессиональных программ. Читатели узнают, как строить новую жизнь и не возвращаться к старым привычкам.
    Откройте для себя больше – [url=https://lux-clinic.ru/stati/zhizn-posle-lecheniya-alkogolizma.html]реабилитационный центр для наркозависимых[/url]

  2. Наркологическая клиника в Екатеринбурге уделяет большое внимание психотерапевтическим методам. Индивидуальный подход к пациенту позволяет выявить причины и особенности зависимости, сформировать устойчивую мотивацию на лечение и отказ от вредных привычек.
    Подробнее тут – http://narcologicheskaya-klinika-ekaterinburg00.ru/chastnaya-narkologicheskaya-klinika-v-ekaterinburge/

  3. В клинике в Сочи реализованы современные протоколы мониторинга состояния пациентов, включая лабораторные исследования и консультации профильных специалистов. Это позволяет своевременно корректировать лечение и минимизировать возможные осложнения. Более подробно о диагностике можно узнать на портале Российского общества наркологов.
    Разобраться лучше – [url=https://narkologicheskaya-klinika-sochi0.ru/]наркологическая клиника нарколог в сочи[/url]

  4. Помню, сосед после недельного запоя. Давление скакало. Капельница от похмелья — И снимает это состояние. Сначала уходит интоксикация. Вывод из запоя капельница — Без осуждения и лишних вопросов. Можете ознакомиться по ссылке: капельницы от похмелья на дому [url=https://lomka.kapelnicza-ot-pokhmelya-ektb-giw.ru]капельницы от похмелья на дому[/url] И про заказ врача для Екатеринбурга. Обращайтесь к специалистам.

  5. spinogambinogame-Impuff

    Once decide to register an online gaming hub, grasping the guidelines of conduct proves essential for a safe plus fun experience [url=https://spinogambinogame.com/terms-and-conditions]spinogambino[/url] . The Spino Gambino webpage upholds a comprehensive array of terms and conditions to verify impartiality, protection, plus transparency for each user. By accessing the official terms page at spinogambino, you acquire important knowledge regarding the legal structure that regulates your association with the service. These guidelines are designed to defend either the user as well as the host, creating a distinct way for account administration, bonus application, and ethical gaming practices.

    The terms and conditions page on spino gambino details several essential sectors, containing eligibility requirements, maturity limitations, along with the validation method. It proves significant to keep in mind that by opening an membership, you remain entering into a legal contract to adhere with these outlined rules. The text outlines the the portal handles member records, executes transfers, and handles withdrawals, granting you the peace of mind that your activities remain monitored and secure. Staying familiar with these standards aids you maneuver the features of spinogambino with assurance, knowing exactly the thing that stands requested regarding membership security plus impartial play.

    Furthermore, the terms cover the ethical gaming efforts endorsed through the company. The platform stands devoted to providing a controlled setting, plus the records show the features ready to users who want to fix boundaries alternatively take a rest from playing. We firmly urge each visitor to peruse these terms thoroughly before they initiate their journey. Should you ever have doubts concerning distinct provisions or require clarification regarding profile protocols, the support team at spino gambino is ready to aid you. Investing the duration to comprehend these rules is not merely a legal necessity; it is a fundamental action toward securing a healthy as well as lasting gaming encounter. Always keep in mind that being educated stands the prime way to savor each aspect that the portal possesses to present during preserving total control over your gaming actions.

  6. chickenroad-opino

    El juego móvil gana popularidad un fenómeno entre los aplicaciones más jugadas más jugados entre los hispanohablantes, donde su simplicidad y adictiva fase de juego han ganado a una gran cantidad de fanáticos [url=https://chickenroad-es-65.vercel.app]Chicken Road Opiniones[/url] .

    Si estás pensando en probarlo o ya lo has instalado, es normal que quieras conocer opiniones reales antes de dedicar horas él.

    Aquí te proporcionamos una guía completa con las retroalimentaciones más comunes sobre Chicken Road en español, derivadas de experiencias de usuarios como Forocoches.

    —
    En primeramente, resulta importante detallar qué es este juego de movilidad. Es un entretención dinámica en el que la meta principal es permanecer activo durante múltiples rondas dodging peligros como animales, coches, y otros riesgos. Aunque su estructura es minimalista, su dificultad aumenta progresivamente lo que lo hace enganchoso para varios jugadores.

    Los comentarios sobre su transparencia son diversas: algunos jugadores destacan que el juego cumple con expectativas y beneficios, mientras que otros advierten que la monetización puede resultar excesiva en fases difíciles donde las pagos son necesarias para progresar.

    —
    Los feedback en español sobre Chicken Road suelen ser favorables en cuanto a entretenimiento y facilidad de juego. Muchos jugadores resaltan que es ideal para matar el tiempo|pasar ratos libres, gracias a su diseño atractivo y gráficos vibrantess. Sin embargo, hay críticas recurrentes sobre la publicidad intrusiva y la escasez de elementos sin costo a durante el juego.

    Algunos usuarios mencionan que, aunque al principio, el juego es libre de costo, para desbloquear mejoras o vidas adicionales es obligatorio gastar dinero real.

    —
    En comunidades digitales o en plataformas de redes sociales, los comentarios honestos suelen reflejar realidad: algunos ven que Chicken Road es un juego justo, mientras que algunos usuarios lo consideran como un ejemplo de cómo los desarrolladores aprovechan la adicción para generar ingresos.

    Si estás en busca de una experiencia 100% gratuita, es posible disfrutar algunas partes sin gastar, pero para disfrutar de todas sus funciones habrá que destinar dinero.

    —
    En conclusión, si te interesa si Chicken Road vale el esfuerzo para disfrutar, varía según lo que esperas en un juego. Si buscas una aplicación enganchosa para pasar el rato, las opiniones de otros usuarios en español suelen estar bien valoradas. Eso no obstante, no olvides que, como en muchos juegos free-to-play, la monetización|el modelo de ingresos es parte del modelo.

    Si decides descargarlo, no olvides leer las opiniones más recentes|consultar comentarios frescos en foros especializados|comunidades de amantes de los videojuegos para estar informado con las últimas mejoras.

  7. Intervenir virtualmente representa una labor que necesita entenderse siempre como una via de diversion y jamas como un camino de obtener ganancias financieras [url=https://chicken-road-login.es/juego-responsable]Chicken Road[/url] . Dentro del portal Chicken Road, la salvaguarda y el bienestar de los jugadores devienen columnas troncales, por lo que promover una cultura de juego responsable se transforma en un objetivo principal. Ingresar en ChickenRoad supone vincularse mediante un espacio en el cual la diversion domina por encima de todo factor, garantizando que la experiencia sea siempre fructifera.

    El juego responsable en Chicken Road se fundamenta en la fijacion de barreras definidas. Resulta crucial que cada jugador administre su dedicacion y su capital antes de iniciar toda partida. La interfaz facilita a los jugadores mecanismos de limitacion que permiten definir ingresos tope, asi como periodos de descanso necesarios para mantener una actitud moderada. Detectar las senales de alerta, como la urgencia de jugar mas alla de los recursos individuales o el esfuerzo de compensar fallos, resulta fundamental para eludir habitos problematicos.

    Para las personas que perciben que han descuidado el dominio sobre su actividad en este sitio, aparecen mecanismos de autoexclusion que proporcionan la posibilidad de ejecutar un cese temporal. El personal de atencion del portal esta preparado para suministrar asistencia frente a toda consulta vinculada a la moderacion ludica, impulsando un entorno en el que la honestidad y la prudencia son los protagonistas. La madurez y la responsabilidad constituyen las mejores armas para gozar totalmente de la oferta de juegos accesibles.

    Rememoramos que la intervencion en sitios de apuestas se encuentra rigurosamente vetada para personas jovenes. En nuestra web, se ejecutan controles permanentes para verificar que solo individuos mayores y responsables intervengan en los mecanismos del sitio. Si percibes que el juego esta perjudicando tu entorno intimo o patrimonial, busca ayuda especializada e emplea los medios de superacion que ChickenRoad facilita en su apartado especifico. Participar con juicio es el unico medio de asegurar que el entusiasmo del triunfo no enturbie el sentido comun requerido para conservar un estilo de vida saludable y estable.

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

  9. Наркологическая клиника «СтаврМедЦентр» — это пространство точной и бережной медицины, где каждая программа лечения зависимостей собирается индивидуально: от первой оценки рисков до стабилизации сна, восстановления аппетита, нормализации пульса и долгосрочной профилактики рецидива. Мы сознательно уходим от шаблонных «сильных» процедур в пользу управляемых шагов: минимум фармакологической нагрузки при максимальной прозрачности решений. Такой подход снижает тревогу, возвращает ощущение контроля, а главное — делает процесс предсказуемым для пациента и его близких. Команда работает круглосуточно: амбулаторные визиты без очередей, немаркированные выезды на дом, стационарный блок с ночным постом и мониторингом — все каналы связаны единой картой наблюдения и общими клиническими протоколами.
    Исследовать вопрос подробнее – http://narkologicheskaya-klinika-stavropol15.ru

  10. Этот обзор посвящен успешным стратегиям избавления от зависимости, включая реальные примеры и советы. Мы разоблачим мифы и предоставим читателям достоверную информацию о различных подходах. Получите опыт многообразия методов и найдите подходящий способ для себя!
    Прочесть заключение эксперта – [url=https://flatrenthq.ru/pages/kruglosutochnuyu-narkologicheskuyu-kliniku-ekaterinburg/]наркологические клиники[/url]

댓글 달기

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