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”의 96,066개의 댓글

  1. Помощь может включать консультацию, детоксикацию, стационар и дальнейшее сопровождение по показаниям.
    Дополнительная информация – [url=https://narkologicheskaya-klinika-voronezh19.ru/]платная наркологическая клиника[/url]

  2. The digital gaming environment possesses a fresh contender creating waves, and regarding those hunting for a distinct adventure, the portal found via spin-granny-casinoreview.org provides a thorough overview at what this provider brings to their service [url=https://spin-granny-casinoreview.org]spingranny[/url] . As you explore the realm concerning spingranny, it becomes obvious that this label is engineered to accommodate to a diverse audience searching towards choice and fun. Whether you are keen towards vintage slots otherwise contemporary table games, the spingranny casino adventure is customized to offer fluid browsing and premium graphics.

    Plenty of gamers scouring for the spingranny official spingranny site frequently seeking for a dependable gateway to entertainment. The spingranny online setting is built with client safety plus involvement as a priority. Provided you are specifically interested about the rush involving real-time engagement, the spingranny live casino department provides an immersive atmosphere that mimics the energy within a land-based floor. Beginning with blackjack to roulette, the selections are numerous towards each person checking out a casino spingranny portal.

    Excluding standard gaming, the site furthermore features strong functions regarding those who like spingranny betting. This combination ensures that regardless if you are a enthusiast concerning sports alternatively turning reels, the spingranny online casino infrastructure contains something to provide. Countless players often hunt for spin granny casino reviews to better comprehend the bonuses along with promotions accessible before joining. Through selecting a trusted spin granny source towards your data, you verify that you are maximizing your betting time plus taking complete gain concerning the VIP rewards offered.

    In summary, the spingranny casino online experience is characterized via its adaptability plus dedication to a pleasant player experience. If you are prepared to plunge towards the excitement, heading over towards the links given by the page listed will provide you all the wisdom required to browse the platform with confidence. Featuring a increasing collection containing games plus a emphasis regarding keeping the player focused, this company is definitely worth your attention should you be trying to elevate your playing rounds today.

  3. Всем привет!
    Хочу поделиться со всеми женщинами и мужчинами, будет нужна или кому нужна виза в КНР или Китай!
    Дело в том, что недавно был в загранке или зарубежом, т.е. в Китае, а у них возникла серьезная и неразрешимая проблема.
    Вы представляете, они хотели набрать сайт русскими буквами, а таких незнакомых и непонятных букв там нет и небыло.
    А потом они узнали, что на самом деле сайт называется непонятными иероглифами, т.е. черточки, цифры и буквы расположенные в хоатичном и беспорядочном беспорядке.
    Через долгое время неудачныи безуспешных х попыток нашли они сайт с знакомыми и понятными английскими буквами.
    Благо к счастью и радости, что в каждой стране идут вместе с местным алфавитом английский алфавит по умолчанию.
    В общем, если вы хотите найти, оформить визу в Китай, визовый центр Китая, oformit-vizu-v-kitay.ru и т.д., например:
    [url=https://oformit-vizu-v-kitay.ru/]туристическая виза в китай в москве[/url]
    Тогда вам обязательно нужно прямо сейчас перейти на сайт Визовый центр Китая и узнать все подробности по бизнес виза в Китай, срочная виза в Китай, туристическая виза в Китай, рабочая виза в Китай, студенческая виза в Китай, семейная виза в Китай, водительская виза в Китай в Москве, Московской области и т.д. https://oformit-vizu-v-kitay.ru/ .
    Обязательно переходите на сайт Визового центра Китая оформить визу в Китай ру, изучайте информацию и сохраняйте в закладки, не забудьте записать номер телефона 8-800-201-26-12 и адрес сайта.
    Всем пока!

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

  5. WinAura is a famous online entertainment site that has won considerable interest among enthusiasts hunting for a seamless and exciting journey in the domain of virtual gaming establishments [url=https://winaura-47.marvinactrompvni913.workers.dev]winaura official[/url] . Whether you’re pursuing for win aura casino entertainment, winaura online betting choices, or an authentic WinAura verified site, this site provides a extensive selection of entertainment designed for both occasional and hardcore enthusiasts. With its intuitive layout and broad game choice, WinAura excels as a best pick for those discovering the thrill of WinAura casino online entertainment.

    One of the highlighted elements of WinAura is its WinAura real-time casino area, where gamblers can appreciate live host interactions, engaging visuals, and the excitement of live outcomes. This adds an further aspect of realism to the playing journey, making it seem almost like stepping into a physical casino establishment. For those who choose the simplicity of on-the-go playing, WinAura guarantees that its winaura online site is designed for mobile devices and pads, enabling enthusiasts to relish their beloved games anytime, on the go.

    The hub also serves a varied array of likes with its broad library of slot machines, round-table games, and gambling choices. Whether you’re keen on big-money Texas Hold’em, fast-paced blackjack, or the unadulterated thrill of video slots, WinAura offers a range of options under the winaura betting category. The platform’s standing for justice and transparency moreover enhances its appeal, as players can trust that their wins are authentic and that the entertainment are managed under rigorous legal guidelines.

    For novices to the site, WinAura creates a friendly environment with generous perks and deals. These rewards, such as sign-up bonuses, free spins, and vip perks, make it easier for players to kick off while enhancing their probabilities of gaining. The WinAura gaming group also profits from regular updates and new game launches, confirming that the hub keeps fresh and interesting.

    In final analysis, WinAura is well beyond another digital casino site—it’s a lively and well-rounded entertainment spot that combines simplicity, diversity, and adrenaline. Whether you’re a enthusiast of WinAura digital play, real-time gaming excitement, or classic betting, this site delivers everything for every player. With its dedication to superiority and gambler happiness, WinAura continues to be a trusted brand in the world of online gambling.

  6. А ты не знаешь, куда обратиться. Родные не спят ночами. Капельница на дому в Воронеже — Осматривает, ставит систему. И голова начинает соображать. Вывод из запоя на дому в Воронеже — работает и ночью. Рекомендую ознакомиться с источником: капельница на дому от запоя [url=https://neotlozhka.kapelnicza-ot-zapoya-vrn-ihn.ru]капельница на дому от запоя[/url] И про срочный выезд для региона. Обращайтесь к специалистам.

  7. Общаемся без осуждения и давления, сохраняя спокойную атмосферу для пациента и семьи.
    Узнать больше – [url=https://vivod-iz-zapoya-voronezh16.ru/]вывод из запоя на дому цена[/url]

  8. Cuando persigues alguna aventura de juego emocionante en el espacio virtual, el dominio spingranny se ha convertido en una alternativa notable destinada a los jugadores que aprecian del riesgo [url=https://spin-granny-login.com.es]spingranny casino online[/url] . Tras acceder al spingranny casino online, los usuarios se encuentran con esa plataforma creada orientada a proveer diversion premium, contando con una interfaz intuitiva que agiliza la entrada a multiples contenidos. Respecto a los usuarios en territorio nacional, spingranny casino espana presenta una propuesta ajustada que fusiona proteccion y diversidad.

    Bastantes apostadores intentan visitar el sistema a traves de spingranny casino gratis, siendo este una gran manera de entender los sistemas de las apuestas previamente a efectuar cualquier inversion con fondos propios. Tras consultar cualquier spingranny casino review, es posible notar que la diversidad es uno de sus pilares. Si tienes dudas en relacion a spingranny betting, el portal tambien contempla apartados destinadas para aquellos que prefieren variar sus posibilidades de apuesta.

    La seguridad es un elemento esencial y, segun dichas spingranny casino opiniones, los usuarios valoran de buena forma la honestidad del operador. Algunas de las inquietudes comunes entre los principiantes atane a las gestiones de capital, concretamente sobre spingranny casino retirar dinero, un tramite que, siguiendo las instrucciones adecuados, es simple y rapido dentro de la plataforma. Tanto si buscas aquel spin granny casino tradicional o las modalidades mas modernos, este portal brinda una biblioteca robusto para disfrutar de mucho ocio.

    En resumen, spin granny se ha establecido como todo un guia en el sector, resaltando debido a su flexibilidad y dedicacion con la satisfaccion del cliente. Tanto si accedes desde tu PC o a traves de spin granny casino espana desde tu terminal, siempre hallaras opciones interesantes. Previo a arrancar tu sesion dentro del casino spingranny, asegurate de revisar todas las normas para explotar al maximo la promocion disponible. Es momento de averiguar el motivo por el cual gran cantidad de apostadores eligen este lugar para sus sesiones de apuestas digitales, gozando constantemente con mesura y aprovechando los avances que este casino te ofrece.

  9. WinAura Casino is a rising platform in the digital betting arena, providing players a sophisticated and entertaining space to play their go-to casino activities [url=https://winaura-casino-17.pages.dev]winaura live casino[/url] . Whether you’re a experienced better or a newcomer searching for a effortless session, WinAura provides a wide array of choices crafted to meet varied tastes. The site, available at the official WinAura portal, stands out with its intuitive layout and a exceptional collection of high-quality entertainment. From classic slot games to interactive games, WinAura guarantees that enjoyment is never dull.

    One of the key features of WinAura Casino is its emphasis on user-friendliness. The website is engineered to be straightforward to use, making it ideal for players who seek a seamless experience. Whether you’re playing on a computer or a smartphone tool, the site adapts to your screen, guaranteeing you can enjoy your favourite entertainment whenever, everywhere. This adaptability is particularly attractive in modern busy era, where simplicity is paramount.

    For those who love live casino action, WinAura features an thrilling live dealer gameplay. The platform works with reputable suppliers to offer real-time entertainment, packed with expert dealers and immersive visuals. This brings a layer of trustworthiness and excitement, making live casino games feel significantly dynamic. Whether you’re engaging in 21, roulette, or chemin de fer games at WinAura provide a unforgettable choice to traditional online slots.

    Another key feature of WinAura Casino is its commitment to integrity. Enthusiasts can trust the games being operated using Random Number Generators (RNGs) that are frequently reviewed for equity. This ensures that every spin is managed with integrity, giving players assurance in their gameplay. Additionally, the site provides a selection of payment options, such as trusted alternatives like Visa/Mastercard, e-wallets, and digital currencies, making transactions and payouts efficient and protected.

    WinAura Casino also accommodates those who love wagering on competitions and other occurrences. The website includes a exclusive gambling zone where players can bet wagers on a broad array of competitions, such as the beautiful game, tennis matches, and the game of basketball. With fair odds and a intuitive layout, WinAura makes sports betting both fun and rewarding.

    If you’re looking for a dependable and exciting virtual gambling journey, WinAura is undoubtedly valuable exploring. With its blend of real-time activities, premium slots, and a effortless layout, it’s a platform that caters to both relaxed and hardcore players. Whether you’re gambling for pleasure or aiming to take home a jackpot, WinAura provides an thrilling and fulfilling experience that guarantees you visiting for additional.

댓글 달기

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