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”의 75,358개의 댓글

  1. Bent u op zoek naar een betrouwbare en vermakelijke plek om een gokje te wagen? Dan is het aan te raden om te kijken naar de wereld van Koning Casino [url=https://koning-casino-13.onrender.com]koning[/url] . Als speler wilt u natuurlijk gebruikmaken van een veilige speelomgeving, een breed aanbod aan spellen en goede klantenservice. In deze Koning Casino review kijken we naar wat dit platform zo uniek maakt. Veel spelers die op zoek zijn naar een hoogwaardig gokplatform Koning vinden hier precies wat ze nodig hebben voor een zorgeloze spelervaring.

    Het platform staat bekend om zijn gebruiksvriendelijke interface en snelle laadtijden. Of u nu fan bent van klassieke gokkasten, spannende tafelspellen zoals blackjack en roulette, of de interactie zoekt in het live casino, bij Koning Casino is de mogelijkheid enorm. De naam zegt het eigenlijk al: als u speelt bij de koning, bent u verzekerd van een eersterangs service. Het spelaanbod wordt regelmatig ververst, waardoor u altijd toegang heeft tot de nieuwste titels van gerenommeerde softwareontwikkelaars.

    Voor spelers die de graag willen wedden op sport, is het gedeelte dat vaak wordt aangeduid als Koning bet casino een uitstekende toevoeging. Hier combineert u het gemak van een online casino Koning met de spanning van sportweddenschappen op een plek. Dit maakt Casino Koning een veelzijdige bestemming voor uiteenlopende gokliefhebbers in Nederland. Het is belangrijk om altijd bewust te gokken, maar bij Koningcasino vindt u de tools en informatie die u daarbij helpen.

    Wanneer u zoekt naar een betrouwbaar adres voor online kansspelen, dan is Koning Casino Nederland absoluut een aanrader. Van de makkelijke interface tot de gevarieerde bonusstructuren, alles is erop gericht om uw ervaring zo fijn mogelijk te maken. Bent u klaar om uw geluk te beproeven? Bezoek dan de website van Casino Koning bet en ontdek zelf waarom zoveel spelers zich aansluiten bij deze populaire groep spelers. Ervaar het zelf en zie waarom dit platform zichzelf met recht een koning in de casinowereld mag noemen.

  2. Interpreting the statutes of a digital gambling environment acts as a pivotal stage for any participant seeking to possess a safe and satisfying time [url=https://spino-gambinobonus.casino/terms-and-conditions]spino gambino[/url] . Whenever you navigate to the Spino Gambino terms and conditions, you accessing the primary system that governs how the casino performs and what is anticipated of its members. Considering you represent a newcomer or an experienced player at spinogambino, dedicating the time to study these provisions diligently remains crucial for securing your member account and ensuring you may claim promotions barring any unexpected complications.

    The rules and regulations document on the Spino Gambino webpage covers a wide assortment of vital subjects, including profile registration, validation steps, and the determined standards for staking bonuses. Through familiarizing yourself with these specifics, you learn precisely what is required to keep consistent with site protocols. This involves recognizing the legal limits, regional exclusions, and the specific rules about payments and withdrawals. Many users skip these records, though they act as a protective layer for both the house and the player, guaranteeing that the entire play continues to be unbiased and clear.

    Moreover, the text details the policies covering bonus misuse and the safe playing resources offered to you. Given spinogambino stands committed to offering a safe environment, these conditions definitely outline the limits of allowable usage. If you possess inquiries about how a certain promotion operates or what follows if a technical error arises in a play, you might possibly uncover the solutions inside this section. If you find any details that sound vague, consulting the help group for explanation becomes forever a sensible action. Via being informed regarding the operational policies at Spino Gambino, you strengthen yourself to concentrate on the enjoyment aspect of your time if being secure that you stay playing in the set guidelines. Always recall that becoming a smart user remains the ideal approach to savor your time at any online gambling platform. [url=http://bookangel.co.uk/boards/threads/hey-folks.364/page-4432#post-142396]Grasping the Rules and Regulations at Spino Gambino: A Vital Action for a Protected Gaming Experience[/url] [url=https://bretonia.eu/forum/topic/83702-link-harbor-cracking-whisper-voyage/page/357/#comment-417899]Grasping the Guidelines at Spino Gambino: A Critical Step for a Protected Gambling Experience[/url] 98001ef

  3. Общаемся без осуждения и давления, сохраняя спокойную атмосферу для пациента и семьи.
    Подробнее – [url=https://5.kapelnica-ot-zapoya-v-moskve14.ru/]kapelnica-ot-zapoya-na-domu-kruglosutochno[/url]

  4. Статья посвящена анализу текущих трендов в медицине и их влиянию на жизнь людей. Мы рассмотрим новые технологии, методы лечения и значение профилактики в обеспечении долголетия и здоровья.
    Осуществить глубокий анализ – [url=https://abitu.ru/zdorove/1408-centr-kodirovaniya-ot-alkogolya.html]вывод из запоя стационар[/url]

  5. Chicken Street Betting Den has become a rapidly sought-after digital wagering venue, especially among UK bettors [url=https://chicken-road-uk-65.ludeliwo76.workers.dev]Chicken Road Casino Review[/url] . As enthusiasm for this wagering platform increases, many players are wondering whether it’s a trustworthy venue or just scam. With so many web-based betting platforms out there, it’s absolutely necessary to perform detailed analysis before depositing live cash. This review aims to present a utterly unbiased review of Chicken Road Casino, examining its reputation, game array, and overall user encounter.

    Initially, when weighing whether Clucking Highway Casino is trustworthy, it’s essential to examine its track record and player reviews. While some users highlight positive experiences, others have voiced problems about slow payouts and unclear legal details. Unlike proven wagering venues with clear regulatory agencies, the Feathered Lane Gaming Hub does not directly declare its regulatory body, which can become a cautionary note for cautious bettors. However, countless gamblers continue to betting Chicken Road Casino offers in the UK, suggesting that it continues notwithstanding these concerns.

    For individuals looking to try Poultry Street Wagering Platform offers in the Britain, the venue features a extensive variety of possibilities, covering roulette games, classic titles, and real-time host encounters. The hub states to ensure real cash betting, but gamblers should check refund percentages and equity before allocating funds. Some reviews note that while the games look stylistically appealing, the absence of third-party reviews makes it verify fairness. This is a significant factor when choosing whether to wager Chicken Road Casino titles for genuine funds.

    Another element to consider is the availability of deals. Chicken Road Casino regularly advertises first-time deals, as well as ongoing benefits, which can be tempting for first-time bettors. All the same, the rules and conditions of these bonuses should thoroughly be examined closely, as some virtual casinos have unstated rules. Punters searching a transparent and honest experience may encounter Poultry Street Wagering Platform comments divided, with some praising the selection of options while others articulate displeasure over login problems.

    If you’re curious whether Poultry Street Wagering Platform is justified testing, it’s wise to weigh the benefits and cons. While it delivers an exciting gaming experience, the absence of clear legal information and fluctuating transfer testimonies turn it into a less secure selection compared to regulated choices. For individuals still interested, playing Poultry Street Wagering Platform options in practice format first can aid determine the platform’s user-friendliness without monetary threat.

    Fundamentally, whether Chicken Road Casino is honest varies on unique journeys and danger limits. Punters should consistently prioritise well-being by performing detailed analysis, verifying feedback, and eschewing sites with unclear rules. If you’re weighing testing it, take action with caution and just deposit amounts you’re comfortable with.

  6. Selekcja odpowiedniej platformy do gry online to kwestia, która potrzebuje szczegółowego zweryfikowania wielu istotnych aspektów, takich jak ochrona, różnorodność oferty oraz łatwość obsługi strony [url=https://ivybet-80.vercel.app]ivybet kasyno[/url] . Wybranym miejsc, które skupia zainteresowanie klientów, jest witryna dostępna pod adresem ivybet-80.vercel.app. Jeśli myślisz nad tym, co zapewnia to miejsce, warto przyjrzeć się bliżej, czym cechuje się ivybet i dlaczego coraz większa liczba osób testuje, co ma do zaoferowania ten serwis.

    Ocenianiając ivybet opinie, można skonstatować, że gracze często podkreślają przejrzysty interfejs oraz obecność różnorodnych gier. Jako innowacyjny kasyno ivybet preferuje bogaty katalog rozrywki, który zaspokoi oraz pasjonatów tradycyjnych automatów, jak i jednostki poszukujące ulepszonych rozwiązań. Kiedy odwiedzasz ivybet pl, masz wstęp do bogatego portfolio, które czyni, że casino ivybet przeistacza się w ciekawym przystankiem na mapie internetowej rozrywki. Mnóstwo ludzi wyszukujących frazy typu ivy bet pl docenia fakt, że strona jest osiągalna dla graczy z naszego kraju, co potwierdza stały wzrost marki ivybet polska.

    Dzisiejsze ivybet casino koncentruje się na oferowaniu dobrej jakości wrażeń, spajając zakłady sportowe z emocjami, jakie oferuje kasyno ivybet. Jeśli Twoim planem jest odkrycie portalu, gdzie ivy bet dostarcza atrakcyjne warunki, warto osobiście sprawdzić pracę serwisu. Gracze, którzy dodają w wyszukiwarkę ivybet bet, często poszukują jasnych zasad oraz błyskawicznego wejścia do swoich wybranych tytułów. Bez względu na to, czy fascynują Cię przede wszystkim zakłady bukmacherskie, czy też wybierasz ivybet kasyno, warto nie zapominać o odpowiedzialnej grze. Reasumując, serwis dostępny pod adresem ivybet-80.vercel.app to propozycja, która zasługuje na zainteresowania osób pasjonujących się dziedziną igamingową. Systematyczne sprawdzanie aktualizacji oraz analizowanie opinii pozostałych klientów pomoże Ci w całkowicie skonsumować możliwości, jaki zapewnia ivybet, korzystając z chronioną i ekscytującą zabawą każdego dnia w ramach tej platformy.

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

  8. В этой статье мы обсудим процесс восстановления после зависимостей, акцентируя внимание на различных методах и подходах к реабилитации. Читатели узнают, как создать план выздоровления и использовать полезные ресурсы для достижения устойчивых изменений.
    Читать дальше – [url=https://pobetony.expert/zdorove/vyzvat-kapelnicu-ot-zapoya-na-domu-nizhnij-novgorod]врача капельницу от запоя[/url]

댓글 달기

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