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”의 94,135개의 댓글

  1. Начать лечение можно с телефонного обращения в наркологическую службу. Для оформления вызова необходимо сообщить адрес дома, возраст пациента и кратко описать его состояние. Оператор уточняет продолжительность запоя, наличие хронических заболеваний и препараты, которые принимались ранее. Такая первичная консультация помогает наркологу подготовиться к выезду.
    Дополнительная информация – [url=https://vivod-iz-zapoya-voronezh19.ru/]нарколог на дом вывод из запоя в Воронеже[/url]

  2. [center][b]Мегамаркет — официальные ссылки 2026[/b][/center]
    [center][i]Обновлённые адреса через клирнет[/i][/center]

    [center][url=https://mg-market5.com/shop/6ae85024e7ff62b1c1ed790613b89457][img]https://mega-market.shop/cdn/ca59212544f2d5020e4ffd9f6b874af5814d8b182cb8ce1e3196cc93903666f8.jpg[/img][/url][/center]

    Друзья! Собрал проверенными зеркалами на мегамаркет — крупнейший даркнет магазин. Потратил время, пока не нашёл живые зеркала.

    Площадка доступна стабильно — главное иметь актуальный адрес. Ниже — три проверенных ссылки войти:

    [list=1]
    [*] [url=https://mgmarket7.name]HidMega — анонимный доступ через приложение[/url]

    [*] [url=https://mega-market.beer]Рабочий вход — клирнет[/url]

    [*] [url=https://mg-market5.com]Официальный MGMarket — зайти сейчас[/url]
    [/list]

    В случае если один из переходников не работает — пробуйте следующий. Все три ведут на официальный ресурс.

    Сохраняйте — не потеряете доступ. Комментируйте если нужна помощь.

    [size=1][color=#333333]mgmarket6 at, https mgmarket6 at, http mgmarket6 at, mgmarket6 at login html, https mgmarket6 at login html, mgmarket6 at не работает, https mgmarket6 at captcha, mgmarket6 t, m mgmarket6 at, https mgmarket6 at main, mgmarket6 ay, сайт mgmarket6, mgmarket6 at slon6 to, mgmarket6 athrom, g11 mgmarket6 at, https g11 mgmarket6 at, https a12 mgmarket6 at, https a12 mgmarket6 at referralcode, https mgmarket6 at login html, https mgmarket6 at captcha, работает сайт mgmarket6 at, mgmarket6 at форум, https mgmarket6 at catalog, g12 mgmarket6 at, mgmarket6 at referralcode, https 68 mgmarket6 at, https 41 mgmarket6 at, https 36 mgmarket6 at, https 11 mgmarket6 at, https 66 mgmarket6 at, https 39 mgmarket6 at, https 67 mgmarket6 at, 68 mgmarket6 at, 41 mgmarket6 at, 36 mgmarket6 at, 37 mgmarket6 at, 11 mgmarket6 at, 6 mgmarket6 at, y5 mgmarket6 at, g mgmarket6 at, https 65 mgmarket6 at, https g10 mgmarket6, https 7 mgmarket6 at[/color][/size]

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

  4. Wild Robin Casino is a frequently mentioned virtual casino in the Great Britain, offering a wide range of games, generous bonuses, and a easy-to-navigate interface [url=https://wild-robin-15.marvinactrompvni913.workers.dev]wild robin reviews[/url] . Whether you’re a long-time bettor or a beginner in virtual gambling, this site provides a reliable starting point for enjoying your preferred entertainment.

    Known for its standing as a trustworthy and trustworthy platform, Wild Robin Casino has earned a strong following among gamblers looking for a hassle-free and profitable venture.

    One of the main highlights of Wild Robin Casino is its comprehensive selection of entertainment, ranging from classic slots to live dealer games. The casino ensures varied options catering to different preferences, whether you enjoy premium poker, exciting roulette, or the adrenaline of slot games. The platform’s dedication to transparency is another key highlight, with regular audits by trusted certification firms to confirm unbiased odds.

    For British bettors, Wild Robin Casino offers several benefits, including quick and protected payments, diverse withdrawal choices, and a welcoming atmosphere. The casino’s rewards and offers are aimed at improving the playing adventure, with initial bonuses, complimentary rotations, and exclusive perks available for frequent players. Many users have shared favourable feedback on Wild Robin Casino, praising the platform’s reliability, customer support, and the total pleasure of gambling on the site.

    If you’re looking for a dependable virtual casino in the Great Britain, Wild Robin Casino is a leading option. With its mix of entertainment, equity, and generous rewards, it shines among peers. Whether you’re seeking top-tier betting options or a effortless playtime, this casino provides. For those who want to learn more, reading Wild Robin Casino reviews can provide greater understanding into what makes this platform so popular among bettors.

    Wild Robin Casino is not simply a betting platform—it’s a go-to spot for those who appreciate entertainment and equity. With its rising popularity and dedication to quality, it’s no surprise that Wild Robin Casino has become a beloved choice among virtual players in the UK. Whether you’re gambling recreationally or pursuing bigger rewards, this platform offers an immersive and reliable experience.

  5. Рекомендации строятся вокруг состояния человека, а не по универсальному шаблону для всех случаев.
    Изучить вопрос подробнее – [url=https://6vyvod-iz-zapoya-podolsk77.ru/]vyvod-iz-zapoya-kruglosutochno[/url]

  6. Помощь оказывают врачи с практикой в наркологии, психиатрии и восстановительной терапии.
    Дополнительная информация – [url=https://7vyvod-iz-zapoya-podolsk77.ru/]vyvod-iz-zapoya[/url]

  7. wildrobin-stort

    Wildrobin’s latest platform is an online hub that focuses primarily on the popular Wild Robin casino game, providing players a space for engage with this thrilling slot experience [url=https://wildrobin-16.pages.dev]wildrobin casino review[/url] . Wild Robin is a renowned title within the online gambling industry, praised for its eye-catching themes, immersive gameplay, and lucrative bonuses. Whether you’re a seasoned player or completely new to the digital gambling scene, this hub could be a valuable resource for understanding Wild Robin casino and its offerings.

    For those unfamiliar with Wild Robin casino, it’s a virtual site where players can enjoy a variety of slot games, like Wild Robin itself, along with premium titles. The platform appears to target British players, making it especially relevant for those looking into Wild robin casino UK. With an increasing number of online casinos including Wild Robin, having a dedicated section to compare Wild robin casino options can assist players in making smart decisions.

    Wildrobin ratings and Wild robin casino evaluations are vital for anyone considering joining. These reviews often spotlight important features such as game selection, return-to-player rates, promotional offers, and support quality. A well-written Wildrobin casino assessment can provide perspectives into whether the site is trustworthy, honest, and fun. Many players also look for Wild robin reviews to evaluate the public perception of the casino before investing their effort or money.

    The online version of Wild Robin is another common keyword as players search for online versions of the game. The ease of enjoying Wild Robin virtually means that fans can appreciate their favourite slots on the go. Whether you’re hunting for a Wild robin casino assessment or just exploring Wild robin online, relying on accurate information is key.

    For those interested in Wild robin casino UK, it’s essential to ensure the casino is approved by UK regulators. This guarantees transparent play, protected transactions, and responsible gambling measures. Many Wild robin casino assessments emphasise the necessity of these considerations, assisting players to skip shady sites.

    In summary, This Wildrobin platform could be a useful resource for anyone exploring Wild Robin casino, delivering comprehensive Wild robin feedback and perspectives into Wild robin digital adventures. Whether you’re seeking a Wild robin casino assessment or just investigating Wild robin casino UK choices, having access to well-researched information can improve your casino journey. Always focus on platforms with strong Wildrobin ratings and solid standings to guarantee a trustworthy and pleasurable experience.

댓글 달기

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