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

  1. myjackpot-Angette

    Le monde des portails de loisirs virtuels continue de changer, et au sein des options les plus recentes, le site myjackpot-3.pages.dev sollicite de plus en plus l’interet des fans [url=https://myjackpot-3.pages.dev]my jackpot[/url] . Si vous recherchez un moment captivant, my jackpot apparait comme une choix optimal pour tester un large choix de contenus. Que vous soyez un veteran des rouleaux ou un adepte de tactiques, cet espace offre un catalogue fourni ou tout joueur peut trouver son plaisir parmi les jeux my jackpot proposes.

    Le prestige de la salle my jackpot repose sur une presentation fluide et une ergonomie parfaite. Les usagers qui souhaitent se rendre sur leur profil adoreront l’aisance du systeme de my jackpot login. Des lors connecte, vous rentrez instantanement dans un univers concu pour le divertissement, avec des graphismes elegants et une prise en main rapide. En tant que casino myjackpot actuel, le portail fait un point d’honneur a fournir une navigation ergonomique, rendant la transition d’un titre vers l’autre sans gene logique.

    S’agissant des utilisateurs localises en France, my jackpot fr forme une solution pertinente pour se divertir en toute tranquillite. La structure myjackpot a ete elaboree pour satisfaire les besoins des joueurs pointilleux qui cherchent avant tout l’excellence et la diversite. La diversite des possibilites presentees sur le my jackpot garantit que l’ennui ne se manifeste jamais, via des ajouts regulieres qui enrichissent la bibliotheque de titres.

    En resume, si vous cherchez une aventure de divertissement totale, pensez a decouvrir les offres my jackpot met en avant. La plateforme s’impose comme un acteur solide, melant simplicite et convivialite pour tous ses utilisateurs. Il est recommande de systematiquement jouer de maniere prudente et de lire les modalites d’usage du portail pour profiter pleinement de votre passage sur les jeux my jackpot. Peu importe que ce soit pour une partie rapide ou une partie prolongee, cette plateforme pourra combler vos attentes de loisirs numeriques via l’appui de une offre variee et une base numerique solide.

  2. В этой статье мы подробно рассматриваем проверенные методы борьбы с зависимостями, включая психотерапию, медикаментозное лечение и поддержку со стороны общества. Мы акцентируем внимание на важности комплексного подхода и возможности успешного восстановления для людей, столкнувшихся с этой проблемой.
    Не упусти важное! – [url=https://stop-alko.info/pohmele/obezbolivayuschie-pri-pohmele-kakie-sredstva-ne-navredyat-organizmu.html]центр наркологии[/url]

  3. The terrain of online gaming in the Great White North is continually transforming, and the advent of platforms like the portal linked at duo-spin-ca.pages.dev has drawn interest of countless gamers [url=https://duo-spin-ca.pages.dev]duo spin casino[/url] . If you are looking for a fresh experience, a comprehensive duospin casino review can help you decide if this platform suits your wagering preferences. As participants nationwide pursue dependable choices, duospin Canada has situated its brand as a major participant in the competitive sector of virtual leisure.

    When performing a duospin casino review, it is important to examine the variety of games, layout, and overall reliability of the page. The duospin online casino adventure is designed to be user-friendly, catering to the novices and experienced bettors who savour the rush of wagering. If you call it casino duospin or only by its label, the platform prioritizes delivering a streamlined setting for those looking to explore a modern gaming library. Numerous users testing duospin bet options value the natural format that keeps moving via various sections of the casino duo spin site effortless and efficient.

    For gamers wondering regarding the credibility and tools of the portal, perusing a comprehensive duospin review is a wise starting point. Recognizing the specific services of the duospin casino online site enables you to control your assumptions concerning play dynamics and settings. The climb of duo spin casino mirrors a more expansive movement of users searching for dedicated sites that emphasize participation and variety. By evaluating the various aspects of the duo spin session, you can clearly comprehend why this page is finding fans within the betting crowd. When you are hunting for the latest additions or evaluating how duospin casino stacks up to international benchmarks, getting the facts is the prime method to appreciate your web-based play. Forever keep in mind to gamble carefully and make sure you know the rules connected with any fresh gambling portal you opt to investigate in the countrywide sector.

  4. uma plataformas tem se destacando popularidade no cenário de apostas online no Brasil [url=https://cbet-4.vercel.app]Cbet Cassino[/url] .

    Se você procura uma opção reputada para jogar ou desfrutar entretenimentos de azar, entender o funcionamento a Sistema CBET pode ser o primeiro etapas para uma experiência segura e divertida.

    A Plataforma digital Cbet é reconhecida por seu espaço atualizado e simples de manipular, perfeito para apostadores novatos e experientes. Com uma amigável, o site permite que os jogadores acessem opções de azar, jogadas esportivas, poker e diversas modalidades em um único ambiente.

    A variedade de escolhas oferecidas faz com que o CBET Play se sobressaia como uma das principais plataformas do mercado.

    Uma das questão de quem procura uma opção de jogos de azar é a credibilidade. Afinal garantir que o valor e os dados privados estejam segurados. O CBET é considerado uma alternativa confiável, pois utiliza medidas de proteção avançadas, como segurança de dados de dados e sistemas de transações transparentes. Outro ponto a plataforma opera de acordo com normas que visam proteger os usuários, o que reforça a confiança do CBET Casino.

    Para quem ama jogadas esportivas, o Cbet Brasil disponibiliza uma ampla gama de partidas ao vivo e análises completas, permitindo que os jogadores façam decisões estratégicas. Já os entusiastas do poker encontrarão no CBET Poker Online diversas de tabelas e modalidades, com escolhas para todos de competência.

    Outro ponto forte do Cbet é a simplicidade de utilização. Como uma página virtual, ela é possível acessada a toda hora, desde que o usuário tenha uma com a rede. Isso garante que a vivência ainda mais confortável, possibilitando que os jogadores utilizem seus tempos de lazer livres de limitações de tempo ou local.

    Em conclusão, o Cbet é uma opção para quem busca uma plataforma de apostas confiável, com uma diversificada variedade de jogos e recursos que suprem às demandas dos apostadores nacionais.

    Se você mesmo perguntas sobre se o CBET é seguro, vale analisar a página e avaliar por si mesmo a excelência dos serviços oferecidos. Com segurança e diversão garantidas, o CBET se firma como uma das principais melhores opções no setor.

  5. spinmamalogincasino-ameds

    Here at Spinmama, we trust that gaming should always remain a constructive and controlled experience [url=https://spinmamalogincasino.com/responsible-gambling]spinmama[/url] . Using gaming sites like Spin mama should be an fun pastime rather than a financial burden. We value the health of our community by offering clear tools and guides dedicated to responsible gambling. Understanding the risks associated with wagering is the first step toward keeping a balanced approach with playing.

    We encourage every player to treat their time on our site with a solid plan. One of the most effective strategies is to set a strict budget before you start your session. By setting short or long-term deposit limits, you guarantee that you only ever wager money that you can easily manage to lose. Avoid seeing gambling as a reliable source of income or a solution to monetary problems. If you find yourself chasing losses or experiencing anxiety about your gaming, it is vital to stop playing right away.

    Spin mama offers several responsible gaming tools built to help you manage your sessions properly. These include the option to set session time reminders, which alert you when it is time to step away from the screen, and voluntary cooling-off periods. If you feel that your playing patterns are becoming unmanageable, you also have the choice to request a temporary or permanent account block. Our support team is available to assist you through these steps, ensuring that your safety stays our main focus.

    Protecting minors and stopping kids from playing is another cornerstone of our mission at Spinmama. We employ robust identity checks to confirm that all our users are of the required age. Furthermore, we advise that guardians use parental control tools to restrict betting sites on computers and phones shared with minors. Responsible gambling is a shared commitment among the site and the user. By staying informed and making use of the tools we offer, you can enjoy the thrills of our online casino while keeping your experience secure and controlled for the foreseeable future.

  6. Эта статья подробно расскажет о процессе выздоровления, который включает в себя эмоциональную, физическую и психологическую реабилитацию. Мы обсуждаем значимость поддержки и наличие профессиональных программ. Читатели узнают, как строить новую жизнь и не возвращаться к старым привычкам.
    Наши рекомендации — тут – [url=https://housefindr.ru/pages/vyvod-iz-zapoya-na-domu-cena-spb/]вывод из запоя на дому санкт петербург цены[/url]

  7. myjackpot3-sluch

    La sphere des jeux virtuels progresse tres vite, et parmi les sites qui captivent le regard des amateurs, le site my-jackpot-3.pages.dev s’affirme tel une plateforme de choix [url=https://my-jackpot-3.pages.dev]casino my jackpot[/url] . Si vous recherchez une aventure agile et captivante, my jackpot offre une ergonomie claire concue pour apporter un maximum de satisfaction aux joueurs. Que vous soyez un veteran ou un novice, decouvrir cet univers reserve au casino my jackpot presente une grande gamme de jeux concus pour tous profil.

    L’acces aux options est facilite via une etape de my jackpot login prompte et fiable. Sitot identifie, vous plongez directement dans le monde de myjackpot, ou la finesse visuelle et la vitesse des divertissements proposent des moments intenses. Les jeux my jackpot sont ajustes pour operer sans anomalie, offrant a n’importe quel utilisateur de beneficier de ses choix en toute serenite. Par ailleurs, la plateforme casino myjackpot donne une point d’honneur a offrir un espace divertissant eclectique, satisfaisant les exigences elevees des parieurs francophiles avec une partie speciale my jackpot fr qui facilite la deambulation pour la communaute nationale.

    La valeur de cette plateforme repose dans sa aptitude a marier facilite et implication. En decidant de parier sur ce domaine, les joueurs obtiennent une experience totale, ou chaque partie, du processus de identification aux manches energiques, est concue pour accroitre le amusement. Il n’est pas etonnant que de plus en plus de parieurs considerent cet domaine comme leur lieu de detente favori pour se evader. En somme, si vous recherchez en recherche d’une plateforme fiable pour vos periodes de loisirs numeriques, consulter les solutions offertes sur ce portail est une excellente demarche. Decouvrez des a present la raison pour laquelle beaucoup d’adeptes de divertissements en ligne font leur confiance a cet monde pour vivre des instants uniques, pleins de sensations intenses et de possibilites de victoires, le tout dans un milieu moderne et totalement ajuste a vos envies journalieres de detente.

  8. Эта доказательная статья представляет собой глубокое погружение в успехи и вызовы лечения зависимостей. Мы обращаемся к научным исследованиям и опыту специалистов, чтобы предоставить читателям надежные данные об эффективности различных методик. Изучите, что работает лучше всего, и получите информацию от экспертов.
    Только факты! – [url=https://stop-alko.info/pohmele/obezbolivayuschie-pri-pohmele-kakie-sredstva-ne-navredyat-organizmu.html]наркология стационар[/url]

  9. Zodra men kiest om jouw geluk te testen bij dat populaire online spel Chicken Road, is het noodzakelijk teneinde volledig geinformeerd te raken van die regels [url=https://chicken-roadgame.nl/algemene-voorwaarden]ChickenRoad[/url] . Op de portal ChickenRoad ontdek je uitgebreide data betreffende de mechanics van dat plezier, echter evenzeer relevant zijn de wettelijke bepalingen. De sectie met algemene voorwaarden is de legale basis voor alle deelnemers welke instappen in dit boeiende avontuur. Het lezen van deze regels is essentieel alvorens men aanvangt door gokken, omdat hierin afspraken vermeld worden aangaande veilig spelen, gebruikersbeheer daarnaast financiele transacties.

    Wanneer enthousiaste gebruiker bij Chicken Road wens jij uiteraard veilig kunnen beleven omtrent het spanning die dat tijdverdrijf aanbiedt. Deze gebruiksvoorwaarden binnen het platform zorgen voor de veilige omgeving waar deze bevoegdheden tevens verplichtingen betreffende plus die speler naast die organisator duidelijk zijn vastgelegd. Indien men momenteel de nieuwe speler is dan de deskundige ChickenRoad professional, de condities zijn voor iedereen van toepassing. In dit geschrift lees je o.a. over de laagste leeftijdsgrenzen, dat beletsel op fraude omtrent het applicatie en alle procedures bij potentiele meningsverschillen. Via goedkeuring te geven aan deze voorwaarden, bevestigt men het feit dat men snapt op welke wijze dat domein opereert.

    Dat opvolgen van de regels op ChickenRoad draagt bij niet enkel teneinde die integriteit van dat spel te waarborgen, echter beschermt ook men eigen persoonlijke beleving. Indien men vragen hebben over alle bepaalde artikelen dan die formele kaders, dan vormt deze pagina binnen de portal steeds de meest bijgewerkte bron. Dat is aan te raden om periodiek te controleren indien er wijzigingen worden geimplementeerd in deze bepalingen van Chicken Road, teneinde je constant kennis draagt betreffende alle meest recente voorschriften. Via men met die overeenkomsten te committeren, kun jij met een gerust hart focussen op de scoren omtrent deze maximale prestaties alsook het ervaren betreffende optimaal vermaak tijdens ieder spelmoment. Openheid blijft voorop voor de eerlijke tevens plezierige speelervaring.

  10. Этот текст посвящён сложным аспектам зависимости и её влиянию на жизнь человека. Мы обсудим психологические, физические и социальные последствия зависимого поведения, а также важность своевременного обращения за помощью.
    Рассмотреть проблему всесторонне – [url=https://narkologiya.pro/alkogolizm/kakie-metody-kodirovaniya-ot-alkogolya-samye-effektivnye/]реабилитация наркозависимых[/url]

댓글 달기

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