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”의 20,284개의 댓글

  1. Эта публикация раскрывает психологические механизмы зависимости и их роль в развитии расстройств. Читатель узнает о том, как психология влияет на формирование зависимостей и как профессиональная помощь может изменить ситуацию.
    Погрузиться в детали – [url=https://autorentsale.ru/pages/narkolog-na-dom-spb/]вызвать нарколога на дом недорого[/url]

  2. Этот обзор сосредоточен на различных подходах к избавлению от зависимости. Мы изучим традиционные и альтернативные методы, а также их сочетание для достижения максимальной эффективности. Читатели смогут открыть для себя новые стратегии и подходы, которые помогут в их борьбе с зависимостями.
    Желаете узнать подробности? – [url=https://housefindr.ru/pages/lechenie-narkomanii-i-alkogolizma/]лечение наркотической зависимости в Самаре[/url]

  3. spinmacho-Foevemn

    Should you remain seeking to improve your gaming experience, identifying the correct rewards proves vital [url=https://spinmacho-login.net/bonuses]code bonus spinmacho[/url] . On spinmacho-login.net/bonuses, participants can find a reserve of promotions built to increase your balance along with prolong your gaming session. Regardless of whether you turn into a beginner or a seasoned player, utilizing a spinmacho casino no deposit bonus is a wonderful approach to explore the platform without any primary financial obligation. By securing a spinmacho no deposit bonus, you can test the latest pokies and table games while retaining your earnings assuming you meet the requirements.

    To begin, simply look for the fresh spinmacho bonus deals obtainable on their main offers section. Many members often hunt for a specific spinmacho bonus code otherwise a code bonus spinmacho to access special promos that stay not offered to the public audience. Inputting a working spinmacho promo code plus a spinmacho casino promo code throughout the enrollment otherwise deposit stage guarantees that you enable the greatest possible advantages. Assuming you are been seeking for a spin macho promo code, you might notice that the website frequently renews its offers to keep the fun alive.

    This proves always a sound idea to monitor your email plus the reward area for any latest spin macho bonus code that could be released. Grasping exactly to apply your bonus spinmacho effectively can produce a significant change in your complete achievement. Concerning those specifically searching for a spin macho casino no deposit bonus, this site gives clear instructions on the way to secure plus fulfill your winnings. Always keep in mind to check the betting terms connected to any spinmacho casino bonus so you realize precisely what remains required to cash out your money. By using a some fortune as well as the correct spin macho code bonus, you might transform these incentive offers into true excitement and prospective payouts. Browse the site now to observe what spin macho bonus fits your betting style and initiate your winning path immediately.

  4. cricketroad-beast

    Should you be searching for an engaging method to savour your beloved sport, the cricket road game has quickly become a buzzworthy topic amidst gaming enthusiasts in India [url=https://cricketroad-21.web.app]cricket road game[/url] . This website offers a unique fusion of sports entertainment and engaging gameplay that ensures players returning for additional content. Many gamers look up the cricket road online game as it provides a fluid experience, enabling them to engage with high-stakes excitement straight from their mobile devices or laptop browsers.

    To get started, players frequently look for the cricket road login process to access their accounts securely. After you have finished your cricket road game login, you obtain total access to the features that render this site shine. As you examine the different styles, you will notice why so many players consider it the real cricket road game experience. The interface is designed to be user-friendly, verifying that both novices and pros can browse the site with simplicity.

    One of the most regularly posed questions concerns the cricket road game money aspect. It is important to remember that participants should habitually visit the cricket road game original site to ensure they are engaging with a authentic platform. By sticking to the official cricketroad domain, you protect your data and appreciate a balanced gaming space. Whether you are interested in casual play or the competitive edge offered via a cricket road casino style configuration, the platform accommodates a vast variety of preferences.

    As you spend more effort on the cricket road, you will uncover why this cricket road online game is grabbing the interest of cricket fans across the nation. It is essential to handle any online gaming service responsibly. Always ensure you are on the authentic site, as there are numerous mirrors or unauthorised replications floating. For those ready to challenge their talents and savour a virtual twist on the game we all adore, accessing the genuine portal is the best first step. Enjoy the rush today and observe why the community keeps to expand around this exciting virtual arena.

  5. Семья получает «путевой лист» на 24–72 часа: как фиксировать маркеры (тремор/тревога/тошнота 0–10), как пить воду малыми глотками, когда приглушать свет и в каком формате общаться с пациентом («короткие факты вместо оценок»). Мы также даём «лестницу активности»: два достижимых действия утром, одно — вечером. Эта дисциплина маленьких шагов помогает избежать эмоциональных «перегревов» и удерживает достигнутый эффект.
    Подробнее тут – [url=https://narkologicheskaya-klinika-v-chelyabinske16.ru/]наркологическая клиника вывод из запоя в челябинске[/url]

  6. Falls Besucher die Webseite spino-gambinospiel.ch aufrufen, setzen wir grossen Nachdruck bezuglich Transparenz sowie dem Schutz der Daten [url=https://spino-gambinospiel.ch/cookie-richtlinie]spinogambino[/url] . Ein wichtiger Punkt in diesem Zusammenhang reprasentiert unsere Cookie-Richtlinie, die exakt darlegt, wie wir Technologien nutzen, zwecks Ihr Nutzererlebnis bei unserer Plattform zu optimieren. Falls Sie die Seite von spino gambino nutzen, gelangen kleine Textdateien, bezeichnete Cookies, an Ihrem Endgerat hinterlegt. Diese dienen dahingehend, die Leistungsfahigkeit unserer Angebote sicherzustellen, statistische Analysen durchzufuhren und Ihnen massgeschneiderte Infos bereitzustellen.

    Im ersten Besuch bei spino-gambinospiel.ch werden Sie uber einen Banner bezuglich die Anwendung dieser Technologien aufmerksam gemacht. Wir unterscheiden dabei zwischen notwendigen Cookies, die fur den reibungslosen Einsatz der Webseite zwingend erforderlich bleiben, sowie wahlbaren Cookies, die etwa fur Marketingzwecke bzw. Analysen eingesetzt kommen. Diese Wahl verbleibt hierbei ganz bei Ihnen. Uber Ihre Browser-Einstellungen bzw. den Cookie-Banner auf unserer Seite verfugen Sie stets die ganze Kontrolle. Sie sind fahig abgelegte Cookies beseitigen bzw. das Ablegen zukunftiger Dateien sperren.

    Nutzer von spino gambino durften hingegen vermerken, dass eine vollstandige Deaktivierung aller Cookies hierzu beitragen kann, dass bestimmte Funktionen auf unserer Webseite moglicherweise keinesfalls langer wie erwartet durchgefuhrt werden. Unser Vorsatz wird dies, den Zugriff derart komfortabel und zuverlassig wie denkbar zu formen. Die erhobenen Informationen werden stets gemass Respektierung der aktuellen Richtlinien bearbeitet. Wir setzen unsere Krafte dahingehend ein, dass die Datensphare wahrend einem jeden Besuch bei spino-gambinospiel.ch erhalten besteht.

    Falls Nutzer Ruckfragen zur Anwendung an Cookies oder zur umfassenden Datenverarbeitung haben, entdecken Besucher in der prazisen Richtlinie bei unserer Webseite die notwendigen Daten. Wir uberarbeiten unsere Cookie-Richtlinie periodisch, zwecks sicherzustellen, dass die Richtlinie entsprechend den aktuellen rechtlichen Normen gerecht wird und immer den aktuellsten Stand unserer technischen Losungen widerspiegelt. Vertrauen zudem Sicherheit darstellen das Grundlage von unserem Angebots. Herzlichen Dank, dass Sie sich bezuglich spino gambino festgelegt sind und auf Transparenz vertrauen. Wir bitten User dahingehend, sich standig hinsichtlich unsere gegenwartigen Regeln zu aufklaren, dahingehend bestmoglich uber einen Schutz Ihrer Datenwerte wissend zu verbleiben.

  7. В данном материале представлены ключевые тенденции в сфере медицинской науки и практики. Вы узнаете о последних открытиях, инновационных подходах к терапии и важности профилактики заболеваний. Особое внимание уделено практическому применению новых методов в клинической практике.
    Эксклюзивная информация – [url=https://ozon-mir.ru/pages/anonimnaya-narkologicheskaya-klinika-nizhnij-novgorod/]анонимная клиника наркологии[/url]

  8. betandplay-knige

    this reliable digital casino hub is steadily capturing notable focus within local betters searching after Bet And Play Gaming alternatively checking Bet And Play Feedback, every platform presents an wide range of gaming avenues structured with a focus on all leisure as well as passionate players [url=https://betandplay-casino-26.vercel.app]Bet And Play Reviews[/url] . With an stress on simplicity including fun, Bet And Play Casino become a notable name across the web-based gambling industry.

    A a key features for this Network resides in the easy-to-navigate layout, making them straightforward to new gamblers while explore among various avenues presented. From slot options plus table avenues, and well virtual facilitator options, such hub provides a extensive selection with a focus on various preferences. When players hunting comprehensive Bet And Play feedback, this platform are with its seamless playing experience and dynamic interface, that improves the entire playing experience.

    Local gamblers have access to enjoy the simplicity of connecting to Bet And Play’s Digital Hub from their devices, whether on computer alternatively smartphone tools. This network’s compatibility with different work platforms makes certain users have access to relish their preferred avenues anytime, from any location. Furthermore, Bet And Play’s National Hub earned by its equitable and unbiased entertainment arena, which are crucial in establishing trust among betters.

    Upon reviewing Bet And Play Evaluations, many betters highlight the network’s excellent bonuses along with incentives. Regardless those first-time rewards or regular incentives, such perks can considerably boost a entertainment venture. However, as among some digital casino site, are essential to review detailed Bet And Play evaluations to grasp an network’s highlights along with any drawbacks.

    Concerning those beginner with Bet And Play Casino, grasp the guidelines plus specifics in rewards becomes crucial. A number of Bet And Play Review articles highlight the cruciality for play-through standards including payment policies, making sure players recognise what to expect after placing some deposit. Such transparency helps establish reliability for the site, rendering them a go-to selection among countless Australian punters.

    To summary, Bet And Play Gaming presents some comprehensive online gambling session featuring strong emphasis on user-friendliness, betting variety, along with gambler fulfilment. Regardless you could be searching after Bet And Play Casino Australia or exploring Bet And Play Insights, that network offers the reliable framework to a pleasurable plus fulfilling gaming experience. Remember guarantee yourself play responsibly in line with the budget.

  9. Dzisiejszy rynek gier hazardowych online ciągle ewoluuje, przyciągając rzesze użytkownikow poszukujących emocji i szans na wygraną [url=https://ivy-bet-77.joelwalkerrid590.workers.dev]ivybet casino[/url] . Jednym z miejsc, ktore zdobywa coraz większą popularność wśrod graczy z Polski, jest platforma znana jako ivybet. Serwis ten stanowi wszechstronny portal, łączące w sobie funkcje nowoczesnego portalu z zakładami sportowymi oraz rozbudowanego kasyna internetowego. Wybierając ivybet pl, użytkownicy otrzymują dostęp do szerokiego wachlarza dyscyplin sportowych oraz tysięcy automatow, ktore zadowolą nawet najbardziej wymagających fanow hazardu.

    Wielu użytkownikow zastanawia się, czy ivybet bukmacher jest odpowiednim miejscem do regularnego typowania. Analizując rynek, można zauważyć, że ivybet polska stawia na przejrzystość oferty, atrakcyjne kursy oraz intuicyjny interfejs, ktory ułatwia nawigację zarowno na komputerach, jak i urządzeniach mobilnych. Jeśli chodzi o ivybet opinie, gracze często podkreślają sprawny proces rejestracji oraz rożnorodne metody płatności, co jest kluczowe dla komfortu korzystania z witryny.

    Dla osob, ktore preferują gry losowe, ivy bet casino przygotowało szeroki wybor tytułow od renomowanych dostawcow oprogramowania. Znajdziemy tam zarowno klasyczne sloty, jak i zaawansowane gry na żywo z prawdziwymi krupierami. Marka ivy bet polska dba o to, aby każda rozgrywka była transparentna i zabezpieczona, co buduje zaufanie w społeczności graczy. Wybierając ivy bet, warto zwrocić uwagę na aktualne bonusy powitalne, ktore znacząco podnoszą kapitał na start. Podsumowując, jeśli szukasz platformy, ktora łączy świat zakładow bukmacherskich z profesjonalnym kasynem, ivybet casino może okazać się strzałem w dziesiątkę. Warto jednak zawsze pamiętać o odpowiedzialnej grze i traktowaniu hazardu jako formy rozrywki. Dzięki regularnym aktualizacjom oferty, ivybet pozostaje konkurencyjnym graczem na polskim rynku, dostarczając użytkownikom pozytywnych wrażeń oraz szans na atrakcyjne wygrane. Przed rozpoczęciem gry zawsze sprawdź aktualny regulamin dostępny na stronie, aby w pełni cieszyć się funkcjonalnościami, jakie oferuje ten nowoczesny operator.

  10. Эта информационная публикация освещает широкий спектр тем из мира медицины. Мы предлагаем читателям ясные и понятные объяснения современных заболеваний, методов профилактики и лечения. Информация будет полезна как пациентам, так и медицинским работникам, желающим поддержать уровень своих знаний.
    Всё самое вкусное внутри – [url=https://9610085.ru/zdorove/narkologicheskaya-klinika-v-spb]клиника лечения зависимостей медицинская помощь[/url]

댓글 달기

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