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,668개의 댓글

  1. Our digital sphere concerning web-based amusement witnesses seen one major alteration via this appearance featuring distinct, rapid activities as combine dexterity and luck [url=https://drop-the-boss-2.vercel.app]drop the boss casino[/url] . Between the most trending games currently capturing our interest by users remains drop the boss. In the event everybody remain hunting regarding an thrilling method to occupy the hours, that drop the boss game offers another new break to conventional formats. By accessing that site located at drop-the-boss-2.vercel.app, enthusiasts might jump towards the simplified design designed regarding quick turns alongside high interaction.

    Regarding people hunting for the drop the boss casino experience, such proves crucial aiming to understand the technical which make the option pop. Differing from the typical drop the boss slot, our activity centres on pace and active decision-making. Some excitement about the drop the boss stake lies in the excitement, as users traverse the digital environment for obtain their intended results. Assuming you feel playing the drop the boss casino game for joy instead seeking this extra calculated path, this openness of the webpage creates that any popular alternative throughout the UK.

    Numerous users looking about drop the boss online value some basic style plus fluid mechanisms. This droptheboss site remains already optimised with both laptop plus cellular, confirming where the drop the boss game stake is stable no matter at which players feel gambling. As some reputation of a drop the boss betting game continues for increase, that remains vital to gamble responsibly plus verify you know all play laws before staking any money.

    If players feel situated within this UK plus looking regarding a up-to-date take on retro-style wagering, that portal delivers some distinct buzz. That drop the boss UK following stays increasing swiftly, enticed by the simplicity regarding the design plus that fast essence pertaining to that round. By accessing this official digital application, one might test the instincts plus view provided anyone have what that needs for dominate these technical. Browse our hub today to find how this plenty of enthusiasts are choosing this to be their preferred site for rapid, engaged amusement.

  2. Эта статья освещает различные аспекты освобождения от зависимости и пути к выздоровлению. Мы обсуждаем важность осознания своей проблемы и обращения за помощью. Читатели получат практические советы о том, как преодолевать трудности и строить новую жизнь без зависимости.
    Уникальные данные только сегодня – [url=https://flatfinders.ru/pages/lechenie-narkomanii-anonimno/]лечение наркомании на дому[/url]

  3. В статье по вопросам здоровья мы рассматриваем актуальные проблемы, с которыми сталкивается общество. Обсуждаются заболевания, факторы риска и важные аспекты профилактики. Читатели получат полезные советы о том, как сохранить здоровье и улучшить качество жизни.
    Перейти к статье – [url=https://fixbuilders.ru/pages/narkologicheskaya-klinika-samara-otzyvy/]круглосуточная наркологическая помощь в Самаре[/url]

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

  5. В данной статье мы акцентируем внимание на важности поддержки в процессе выздоровления. Мы обсудим, как друзья, семья и профессионалы могут помочь тем, кто сталкивается с зависимостями. Читатели получат практические советы, как поддерживать близких на пути к новой жизни.
    Как достичь результата? – [url=https://housemastery.ru/pages/lechenie-narkomanii/]лечение подростковой наркомании[/url]

  6. В этой статье мы рассмотрим современные достижения в области медицины, включая инновационные методы лечения и диагностики. Мы обсудим важность профилактики заболеваний и роль технологий в улучшении качества здравоохранения. Читатели узнают о влиянии медицины на повседневную жизнь и ее значение для современного общества.
    Желаете узнать подробности? – [url=https://fixbuilders.ru/pages/horoshaya-narkologicheskaya-klinika-nizhnij-novgorod/]наркологическая клиника алкоголь нижний новгород[/url]

  7. Эта медицинская заметка содержит сжатую информацию о новых находках и методах в области здравоохранения. Мы предлагаем читателям свежие данные о заболеваниях, профилактике и лечении. Наша цель — быстро и доступно донести важную информацию, которая поможет в повседневной жизни и понимании здоровья.
    Интересует подробная информация – [url=https://finbizhub.ru/pages/vyvod-iz-zapoya-deshevo/]вывод из запоя на дому круглосуточно[/url]

  8. vegashero-Outlimb

    Bei Vegas Hero platzieren wir gro?en Fokus hinsichtlich Offenheit und dem Wahrung der Datensicherheit [url=https://vegashero-au.at/cookie-richtlinie]vegas hero[/url] . Falls Sie unsere Webseite aufrufen, entnehmen Sie an der offiziellen Seite zur Cookie-Richtlinie prazise, wie wir Tools einsetzen, um Ihnen das bestmogliches Gaming-Vergnugen zu bieten. Die vorliegende Richtlinie verdeutlicht verstandlich, welche Informationen durch Cookies nebst vergleichbare Tracking-Tools erfasst gelangen und fur welchen Absichten diese dienen. Wie Nutzer bei Vegashero haben Sie permanent eine ganzliche Macht daruber, welche Datenpunkte Sie ubermitteln mochten, und haben Sie Ihre Optionen in dem Browser entsprechend anpassen.

    Jene Verwendung der Cookies bei der Plattform bei Vegas Hero ist darauf konzipiert, die Funktionalitat der Webprasenz zu verbessern. Sie helfen dem Team hierbei, Ihre bevorzugten Optionen zu speichern, die Performance zu verkurzen sowie sicherzustellen, dass Sie schnell bzw. einfach hinsichtlich Ihre Spielhighlights einloggen durfen. Zudem verwenden wir neutrale analytische Werte, um zu analysieren, die Sektionen der Portfolios besonders beliebt gereiht sind, damit wir Vegashero kontinuierlich bezuglich Sie verbessern konnen. Der Schutz genie?t hierbei immer maximale Dringlichkeit. Das Unternehmen setzen neueste Verschlusselungstechnologien an, zwecks zu gewahrleisten, dass die uber Cookies erfassten Daten bewahrt bleiben nebst keinesfalls auf externe Dritte weitergegeben gelangen.

    Innerhalb dieser Cookie-Richtlinie lokalisieren Sie weiterhin eine detaillierte Aufschlusselung dieser unterschiedlichen Arten, welche wir nutzen. Dazu zahlen notwendige Cookies, welche bezuglich den Lauf der Prasenz notwendig sind, sowie optionale Cookies bezuglich Werbe- bzw. Auswertungen. Wenn Sie die Besuch bei Vegas Hero beibehalten, stimmen Sie der Nutzung jener Technologien entsprechend der Vorgabe zu. Falls Sie allerdings Anpassungen durchfuhren wollen, durfen Sie dies muhelos mittels die Optionen in dem Browser oder dem passenden Hinweis auf der Seite anpassen. Das Team von Vegashero beabsichtigen, sodass Sie die Person bei uns angenehm und auch geborgen empfinden. Gonnen Sie sich deswegen einige Augenblick Gelegenheit, zwecks jene Details auf der Sektion zur Cookie-Richtlinie zu studieren, sodass Sie prazise wissen, wie die Personlichkeitsdaten von Vegas Hero sorgsam verwendet werden, um Ihnen das optimale Unterhaltungserlebnis zu garantieren. [url=https://boimoe.com/index.php?blogger_id=2&route=information%2Fblogger]Transparenz bei Vegas Hero: Alles zur Tracking-Methoden sowie Ihrem Datenschutz beim Entertainment.[/url] [url=https://www.challenger4g.com/forum/threads/very-insightful-thoughts.36294/page-305#post-432478]Klarheit bei Vegas Hero: Alles uber die Tracking-Methoden und dem Sicherheitsaspekt wahrend des Spielerlebnis.[/url] fec9800

  9. betandplay-keype

    digital gambling hub has become the online entertainment hub that is rapidly attracting Australian gamblers hunting for an trustworthy and feature-packed betting journey [url=https://betandplay-login-3.vercel.app]Bet And Play Casino Australia[/url] .

    As a promising players in the Bet And Play Casino Australia market, it delivers a varied selection of entertainment options, rewards, and a easy-to-navigate interface crafted to suit all types of bettors.

    Whether you’re scouring for honest Bet And Play assessments, or seeking a detailed analysis of Bet And Play, understanding its offerings can help you to determine if it’s the ideal pick for your entertainment needs.

    A major features of the platform lies in its seamless entry. The hub is with the smooth entry system, ensuring that gamblers can quickly enter their profiles and jump into entertaining their go-to games.

    For newcomers to web-based betting, the this platform provides an easy onboarding and account validation, making it far easier to kick off reducing tedious processes. This is critically essential for local players who seek convenience and safety when choosing an online betting hub.

    The entertainment choice at the site stands out as another highlight. The casino offers a extensive range of table games, live dealer choices, and betting opportunities, ensuring there’s an option for any kind of player.

    Whether you prefer traditional poker games like Golden Goddess or significantly more modern games with visually appealing graphics, the Bet And Play Casino Australia offers skipping compromising. Additionally, the inclusion of live casino entertainment contributes the additional element of excitement, enabling enthusiasts to participate in interactive connection with dealers and other bettors.

    Rewards and special deals are an key draw for numerous gamblers. The platform often delivers sign-up rewards, free spins, and exclusive benefits to elevate the betting experience.

    These bonuses can act as significantly enticing to prospective enthusiasts hunting to enhance their first deposits. Nevertheless, it’s perpetually sensible to review the conditions diligently, as various perks may come with playthrough conditions.

    When reviewing an Bet And Play Review, it’s crucial to examine both of the site. While the site is recognized for its straightforward layout and vast entertainment selection, a few players might voice concerns about withdrawal speeds, or helpdesk responsiveness. As with all virtual wagering network, accountability and justice turn out to be vital, so reviewing third-party feedback and gambler feedback can offer useful insights.

    For those hunting to examine the virtual wagering hub, it’s worth acknowledging that the network prioritises safety and adherence with Australian entertainment regulations. This guarantees that enthusiasts can enjoy their go-to games with tranquillity, knowing their personal and monetary details are guarded.

    Whether you’re the seasoned gambler or brand-new to entertainment, the site offers a trustworthy choice in the competitive Australian online gambling scene. Forever bear in mind to play sensibly and utilise available resources for responsible wagering approaches.

댓글 달기

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