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”의 21,511개의 댓글

  1. baxterbet-AssuB

    Identifying a trustworthy and amusing destination for virtual gaming constitutes a major priority for various users, and Baxterbet is fast turning into a title deserving attention [url=https://baxterbet-109.auroraserverorchidtbrft909.workers.dev]baxter bet casino[/url] . For individuals seeking a superior adventure, the Baxterbet casino online delivers a seamless platform engineered for both seasoned gamblers and beginner newcomers. As you check out Baxter bet online, you shall identify a diverse range of titles that fits all desires, from standard casino staples to the freshest immersive slots.

    The broad appeal of the site is demonstrated in plenty of Baxterbet reviews, which constantly emphasize the service’s commitment to privacy and honest play. Should you keep scouring for a fresh casino Baxterbet environment, this site shines for its natural browsing and snappy start-up speeds. Loads of bettors who just transferred to the Baxter bet casino online hub value the synergy between visual flair and operational efficiency, ensuring that each playtime is effortless and entertaining.

    Privacy is crucial when participating with each casino Baxter bet company, and the site prides itself in upholding elevated benchmarks of user protection. Via selecting Baxterbet, you enter starting an space that favours player security while giving an thrilling range of gifts and bonus campaigns. As viewed in various Baxter bet reviews, the users cherishes the clarity and reliability delivered by this virtual entertainment destination.

    For gamers eager to start, the sign-up procedure for the Baxterbet online platform is straightforward, allowing you to enter your favourite activities without needless pauses. If you are keen to the competitive aspect of streaming host desks or the captivating storylines of contemporary slot games, the hub delivers a high-quality casino adventure. Given its increasing status, the Baxter bet portal persists to be a top choice for players within the UK. Using choosing this site, you will be registering for a classy and secure gaming experience that holds you at the core of the action every single day. Discover the world of online fun now and see why numerous players are making the switch.

  2. какие наркотики купить где купить лсд Мефедрон купить, кокаин купить где купить лирику без купить гашиш шишку бот наркошопа
    где купить лсд купить меф мяу мяу купить марихуана питерhttps://kerchkupit.xyz купить гашиш героин телеграм купить меф

  3. spinmachocasino-Bacrick

    Η γνώση αυτών των όρων και προϋποθέσεων αποτελεί το πιο κρίσιμο στάδιο για τον κάθε μέλος που σκοπεύει να βιώσει μιαν ασφαλή και τίμια εμπειρία απασχόλησης [url=https://spinmachocasino.org.gr/terms-and-conditions]spinmacho[/url] . Στην τοποθεσία spinmacho, αυτή η ειλικρίνεια αποτελεί πρωταρχικό στόχο, για τον λόγο αυτό επίσης η άρθρο με τους κανόνες συμμετοχής στον σύνδεσμο spinmachocasino.org.gr/terms-and-conditions είναι σχεδιασμένη προκειμένου για να προσφέρει τέλεια ευκρίνεια σχετικά με τα προνόμια και τις δεσμεύσεις των εγγεγραμμένων χρηστών.

    Ο κάθε φρέσκος χρήστης ο οποίος συνδέεται στο spin macho χρειάζεται για να ξοδέψει περιθώριο ώστε για να μελετήσει διεξοδικά αυτό το συγκεκριμένο κείμενο. Σε εκείνο το σημείο παρουσιάζονται λεπτομερώς όλοι οι κανόνες που καθορίζουν την σύσταση και τη διαχείριση του λογαριασμού σας, τις απαραίτητες διαδικασίες επαλήθευσης πληροφοριών, μαζί με τους κανονισμούς που αγγίζουν τις χρηματικές καταθέσεις όπως και τις εξαγωγές χρημάτων. Η τήρηση με τους συγκεκριμένους τους όρους παραμένει απαραίτητη με σκοπό την αποφυγή πιθανών δυσκολιών και για την απρόσκοπτη πραγματοποίηση του προσωπικού σας λογαριασμού.

    Ειδική προσοχή δίνεται στους κανονισμούς τα οποία καλύπτουν τα μπόνους και τις προωθητικές ενέργειες του καζίνο spinmacho. Τα μέλη γνωστοποιούνται αναλυτικά για τους όρους τζόγου, τα χρονικά διάρκειες εφαρμογής των δώρων και τις δεσμεύσεις οι οποίοι ενδέχεται να μπορούν να τρέχουν πάνω σε ορισμένα παίγνια. Η κατανόηση αυτών των σημείων ενισχύει στην καλύτερη καλύτερη διοίκηση του κεφαλαίου σας και στη χρήση των δυνατοτήτων τις οποίες μοιράζει αυτό το κατάστημα.

    Επιπλέον, η σελίδα στο spinmachocasino.org.gr/terms-and-conditions περιλαμβάνει ζητήματα υπεύθυνου παιχνιδιού, καθορίζοντας όρια και εργαλεία αποχής τα οποία θωρακίζουν το χρήστες ενάντια στην την αλόγιστη συμπεριφορά των λειτουργιών. Η ομάδα εξυπηρέτησης του spin macho παραμένει διαρκώς διαθέσιμη για να μπορεί να διευκρινίσει οποιονδήποτε όρο ο οποίος δεν είναι απόλυτα κατανοητός, βελτιώνοντας κατ αυτόν τον τρόπο το ίδιο το αίσθημα σιγουριάς ανάμεσα της επιχείρησης και των παικτών της. Η ανάγνωση των προϋποθέσεων δεν φαντάζει μόνο μια τυπική ενέργεια, παρά ένα κομβικό πλεονέκτημα για κάθε χρήστη ο οποίος σκοπεύει να μπορεί να διατηρεί την κυριαρχία της δικής του πορείας του, διασφαλίζοντας πως η παραμονή του παίκτη πάνω στον καζίνο θα εξελιχθεί διασκεδαστική, σταθερή καθώς και πάντα εναρμονισμένη προς τους κανόνες της εφαρμογής.

  4. a widely recognised online gambling venues globally, providing a extensive array of gambling and casino options [url=https://1xbet-casino-17.vercel.app]1xbet Casino Uk[/url] . If you’re searching for a dependable and exciting playing venture, notably in the United Kingdom, figuring out whether 1xbet is genuine and how it compares against other options is essential. This analysis will delve into everything you require about 1xbet Casino UK, its credibility, and what makes unique it.

    The UK 1xbet casino has earned substantial notoriety for its comprehensive game offerings, encompassing slots, live casino plays, sports betting, and card games. The website is designed to appeal both beginners and seasoned players, featuring a easy-to-navigate layout and a diverse range of wagering opportunities. One of the common queries many users ask is, “Is 1xbet legit?” The conclusion is a definite yes—1xbet is a well-established and certified operator, ensuring a protected environment for live deals. The site complies tight regulatory guidelines, ensuring transparent gaming and sensible gambling practices.

    When considering testimonials about 1xbet, it’s evident that users praise the website’s clarity, quick withdrawals, and diverse game library. The gaming site also extends lucrative incentives for fresh and returning users, turning it an appealing option for those seeking to optimise their gambling journey. Whether you’re engaged in sport wagering, casino plays, or real-time host encounters, 1xbet delivers a smooth and thrilling site.

    For those in the UK, reaching the platform is effortless, as it supports live payments and refunds through assorted payment methods. The site is designed for mobile players, allowing that you can appreciate your preferred plays on the run. Additionally, the platform’s client service is on hand 24/7, offering help whenever needed.

    In final analysis, if you’re pondering about “Can you trust 1xbet?”, the verdict is a unwavering yes. It’s a beloved website with a exceptional track record, offering a diverse range of gambling choices and a safe gaming space. Whether you’re a sport wagering enthusiast or a casino fanatic, 1xbet Casino UK offers an exceptional journey for all categories of gamblers. Ensure you play ethically and review regional laws before betting.

  5. Этот обзор сосредоточен на различных подходах к избавлению от зависимости. Мы изучим традиционные и альтернативные методы, а также их сочетание для достижения максимальной эффективности. Читатели смогут открыть для себя новые стратегии и подходы, которые помогут в их борьбе с зависимостями.
    Запросить дополнительные данные – [url=https://watertechology.ru/pages/narkolog-na-dom-vyvod-2/]нарколог на дом сколько стоит[/url]

  6. Организм, подвергшийся воздействию наркотических веществ, нуждается в очищении от токсинов. Детоксикация проводится под медицинским контролем с применением препаратов, поддерживающих работу внутренних органов и минимизирующих неприятные симптомы.
    Изучить вопрос глубже – [url=https://lechenie-narkomanii-novosibirsk0.ru/]лечение наркомании цена[/url]

  7. Он не спал, не ел, у него начались галлюцинации. Сосед вызвал скорую. Мы начали искать. круглосуточный присмотр — мы согласились не раздумывая. Он был агрессивным, не понимал, где находится. Начал есть, спать, разговаривать по-человечески. Через три недели его выписали. Он держится. Мы благодарны врачам за то, что вернули нам родного человека. выведение из запоя стационар [url=https://vrach.vyvod-iz-zapoya-v-stacionare-samara-gic.ru]выведение из запоя стационар[/url] По ссылке — подробная информация для нашего города. Главное — сделать первый шаг. Вывод из запоя в стационаре — шанс на новую жизнь!

  8. chickenroad-Unepaiz

    Should you are hunting for an thrilling approach to evaluate your hunches and fortune, the chicken road game has emerged one of the hottest titles in the online gaming scene [url=https://chickenroad-game-247.web.app]chicken road[/url] . Open via chickenroad-game-247.web.app, this portal offers a distinct experience for players who love fast-paced challenges. Numerous Filipino players are drawn to the chicken road gambling game thanks to its simple mechanics and the excitement of guiding the path without striking an obstacle. No matter you label it road chicken or merely chickenroad, the objective continues the same: maintain your avatar moving forward to increase your payouts.

    The chicken road casino encounter provides a welcome change from traditional gambling options. Differing to a typical chicken road slot that relies completely on stochastic number generators, the chicken road game gambling nature requires a little concentration and rhythm. Gamers like the fluid interface of the portal, making it simple to access chicken road game online even on portable phones. As you advance through the tiers, the pressure rises, giving you that adrenaline kick that every devotee of a great road chicken game looks for.

    For individuals who have already conquered the first iteration, there is plenty of fun waiting in the next installments. Multiple gamers are right now seeking out chicken road 2, which introduces improved visuals and novel aspects that enhance the overall gameplay. Because the platform at chickenroad-game-247.web.app is tailored for domestic players, it stays a top choice for those in the Philippines who wish to experience top-tier amusement. Constantly recall to play sensibly and establish limits while you guide your path to victory. The simplicity of the chicken road rules guarantees that everyone can jump in and start playing in mere seconds. If you are set to toss your reflexes to the challenge, checking the portal this moment might be your first move getting a massive win. Experience why many people are talking about this addictive title and join the growing society of gamers today.

  9. Статья посвящена анализу текущих трендов в медицине и их влиянию на жизнь людей. Мы рассмотрим новые технологии, методы лечения и значение профилактики в обеспечении долголетия и здоровья.
    Изучить рекомендации специалистов – [url=https://autorentsale.ru/pages/kapelnica-ot-alkogolya-na-domu/]центр вывод из запоя[/url]

  10. Opting for the ideal site for your gambling entertainment is crucial, and Baxterbet has quickly become a renowned brand for gamers hunting for a complete journey [url=https://baxter-bet-109.onrender.com]baxter bet online[/url] . If you are researching the latest alternatives, the site found at baxter-bet-109.onrender.com provides a simplified layout crafted for convenience. When thinking about where to gamble, many fans search for dependable information, and recent baxterbet reviews indicate a growing admiration for the range of titles accessible on the domain.

    As you investigate a baxter bet casino online adventure, you will realise that the destination focuses on balancing traditional hits with modern interaction. Whether you enjoy spinning the reels or proving your methods at the cards, the baxterbet casino online surroundings is constructed to satisfy varied needs. Numerous members searching for a high-calibre baxter bet casino frequently prioritise accessibility and title selection, and this hub aims to satisfy on those core demands.

    For people who are new to the industry, inspecting baxter bet reviews can provide valuable perspectives into the user-interface and general speed of the service. The movement to using a dedicated baxterbet online portal has rendered it faster than ever to obtain top-tier gaming tools from anywhere. When you elect to connect with the casino baxterbet features, you are accessing a digital area that favours smooth movement.

    If you are presently analysing a casino baxter bet that fits your requirements, it is helpful to review the qualities that shape the brand. A baxter bet online profile provides a gateway to a diverse library, verifying that the baxterbet online experience continues to be novel and thrilling. By assessing the existing layout, gamers can comprehend why the baxter bet casino site is gaining popularity. In conclusion, the site encourages you to explore its products at your own speed, supplying a special area for those who appreciate a balanced play adventure. Regardless of you are searching for the initial occasion or returning, the venue stays dedicated to providing superior entertainment for its group of players.

댓글 달기

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