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”의 68,090개의 댓글

  1. Если дома нет возможности обеспечить тишину (ремонт, маленькие дети, гости), можно кратко перейти в «тихий стационар» с отдельным входом; после стабилизации сопровождение возвращается на дом, и маршрут продолжается «зеркально» — с теми же целями и окнами оценки. Такой перенос сохраняет управляемость процесса и снижает тревогу семьи: никто не «начинает сначала», меняется только место, а логика остаётся прежней.
    Ознакомиться с деталями – [url=https://narkologicheskaya-pomoshh-v-kazani16.ru/]наркологическая помощь на дому казань[/url]

  2. lucky7even-Breatry

    If you are searching for a premier gaming destination in the Canadian market, look no further than the latest platform at lucky7even-ca.vercel.app [url=https://lucky7even-ca.vercel.app]luckyseven casino[/url] . This site has quickly become a favourite among Canadian enthusiasts who appreciate a seamless blend of fun and trustworthiness. As a contemporary digital arena, luckyseven provides an immersive experience that suits all sorts of gamers, whether you are a devotee of classic table games or the latest video slots.

    When assessing any online casino, the quality of the interface and game variety are paramount. At lucky seven, you will find a vast library of titles created by top-tier software developers, ensuring that every game round is fair and graphically impressive. Many users seeking a luckyseven casino experience often highlight the site’s intuitive navigation, which makes locating your preferred titles very straightforward. It is clear that the team behind casino lucky seven have prioritized user experience, creating a seamless shift from desktop play to mobile convenience.

    If you are looking for a detailed lucky seven casino review, you will find that the site stands out in player assistance, rapid payout times, and generous promotional offers. The lucky 7 seven casino atmosphere is built to be welcoming and engaging, providing a safe space for Canadian players to enjoy their pastime. In addition, the convenience of the lucky seven casino online platform means you can access world-class gaming from the convenience of your living room at any time.

    Many frequent players describe the lucky seven online casino as a top-tier choice for those who appreciate premium aesthetics and regular game updates. As you explore the lucky seven site, you will quickly understand why it has built such a solid name. Whether you are new to the world of virtual gaming or a seasoned professional, the lucky seven offers something for everyone. Be sure to check out the platform today to discover why so many enthusiasts regard it as the ultimate destination for thrills and winning opportunities. Experience the difference for yourself and become part of the group at this outstanding Canadian gaming site.

  3. ohmyspins-EveseE

    Jeder, der auf der Jagd nach einem zeitgema?en und spannenden Spielerlebnis auf der Suche ist, sollte das ohmyspins Casino unmoglich auslassen [url=https://ohmyspins-13.onrender.com]ohmy spins[/url] . Die Plattform hat sich in der Welt der Internet-Casinos einen Status gemacht, dadurch dass sie eine gro?artige Spielauswahl mit einer einfachen Oberflache kombiniert. Sobald man sich die unterschiedlichen ohmyspins erfahrungen ansieht, ist sofort auf, dass viele Spieler vorwiegend die Bandbreite der angebotenen Slots und Live Dealer Tische bevorzugen. In einer ausfuhrlichen ohmyspins bewertung offenbart sich des Weiteren, dass die systemseitige Umsetzung punktet. Die Webprasenz ist schnell, ubersichtlich und lasst sich intuitiv bedienen.

    Viele Nutzer, die auf der Jagd nach einem vertrauenswurdigen Anbieter suchen, durchstobern regelma?ig eine ohmyspins casino review, damit sich uber Sicherheitsstandards und Auszahlungsmodalitaten in Kenntnis zu setzen. Dabei punktet das Portal uberwiegend hervorragend ab, weil es durch klare Bedingungen und einen kompetenten Kundensupport glanzt. Besonders die ohmyspins erfahrung im smartphone Bereich wird mehrmals gelobt, indem man muhelos von extern auf das vollstandige Portfolio navigieren kann. Genau das ist dieses stimmige Zusammenspiel von Design und Usability, das ohmyspins zu einer ansprechenden Anlaufstelle transformiert.

    Fur Neulinge in der Gilde ist eine analytische ohmyspins casino erfahrungen Analyse haufig der wichtige Schritt, damit das private Budget effizient einzusetzen. Das Bonusangebot beim casino ohmyspins ist dabei ein entscheidender Faktor, der etliche Spieler fesselt. Spieler, der nach Abwechslung mit dem besonderen Extra fahndet, sto?t bei ohmy spins eine Plattform, die auf die Bedurfnisse der aktuellen Zeit optimiert ist. Unabhangig davon, ob traditionelle Spielautomaten oder neuartige Tischspiele bevorzugt werden, hier entdeckt man eine adaquate Option. Sobald Sie eine objektive ohmyspins review durchlesen, sollen Sie bemerken, dass hauptsachlich die regelma?igen Aktionen und das Treueprogramm den nachhaltigen Spielspa? steigern. Kurzum kann man festhalten, dass ohmyspins ein starkes Paket bereitstellt, das sowohl Anfanger als auch versierte Spieler begeistert und durch ein transparents Gesamtkonzept uberzeugt. Jeder, daher ein anderes Casino erproben mochte, findet hier eine ideale Basis fur spannende Momente und potenzielle Gewinne.

  4. Entering your gaming account should always be a simple and efficient experience [url=https://need-for-slotsreview.eu/login]need for slots user login[/url] . If you are a fan of high-quality online gaming, navigating to the need for slots login is your first step to enjoying a vast library of entertainment. Regardless of whether you play from your PC or a mobile device, the platform ensures that your journey from the landing page to your favorite games is as rapid as possible.

    To get started, simply locate the site access button placed on the homepage. This will take you to the secure access portal where you can enter your account details. Ensuring that you are on the correct site is vital for your security, as it safeguards your personal data and account integrity. Once you have navigated to the login screen, enter your username and password carefully. If you have forgotten your login info, the site offers helpful recovery options to return you to your games without delay.

    Using the need for slots user login feature allows you to track your funds, track your progress, and claim special rewards customized for your gaming style. The interface is built with ease of use in mind, making the need for slots sign in process intuitive for both beginners and experienced gamblers. By keeping your login information confidential and secure, you can enjoy a seamless experience every time you log back in.

    The current digital gaming landscape requires a reliable portal, and this site offers exactly that. By simplifying the sign-in flow, the platform lets you spend less time navigating menus and more time exploring the latest titles and trending slots. Remember to log out of your session, particularly when using communal computers, to ensure optimal account safety. With your details at the ready, the world of top-tier gaming is only a moment away, providing you with endless excitement and the potential for jackpots in a trusted environment.

  5. Эта медицинская заметка содержит сжатую информацию о новых находках и методах в области здравоохранения. Мы предлагаем читателям свежие данные о заболеваниях, профилактике и лечении. Наша цель — быстро и доступно донести важную информацию, которая поможет в повседневной жизни и понимании здоровья.
    Погрузиться в детали – [url=https://tuning-center1.ru/kodirovka-ot-alkogolizma-mif-panatseya-ili-realnyy-shans-na-novuyu-zhizn/]Кодировка от алкоголя[/url]

  6. меф гаш купить конопля купить москва купить Мефедрон, Гашиш, Бошки, Альфа-ПВП купить шишек марихуаны купить наркотики купить бошки москва
    где купить наркотики где можно купить наркотики где можно купить марихуануhttps://lisichanskkupit.xyz купить рецепт на лирику можно купить наркотики

  7. Should you be searching for an thrilling spot for your gaming requirements, the website found at vincispin-casino.org earns your attention [url=https://vinci-spincasino.org]vincispin casino[/url] . As a current casino site, vincispin offers a broad array of games designed to accommodate either new users and veteran high-rollers. When you browse the site, it grows clear that vincispin casino values player satisfaction by providing a seamless design that renders navigating through slots, roulette, and real-time choices incredibly intuitive.

    For individuals who are interested about the platform’s trustworthiness, a thorough vincispin review uncovers that the venue is devoted to upholding great levels of integrity and security. Many visitors who enter the vinci spin casino praise the variety of bonuses and current offers, which are tailored to enhance your bankroll and give extra opportunities to succeed. Whether you are accessing the portal via PC or handheld, the performance of the vincispin online casino continues always fluid, guaranteeing that you never miss a moment of the excitement.

    The reputation of the name has grown notably among gaming fans who admire the superior graphics and engrossing gameplay provided by leading software companies. When you peruse a common vincispincasino review, you will usually discover references of the rapid cashout speeds and the helpful customer staff, which are essential elements of a positive gaming environment. Users picking casino vincispin can expect a secure space where their information and payment transfers are guarded by advanced encryption systems.

    In brief, if you are looking for a trustworthy and entertaining place, the vinci spin site shines as a strong rival in the market. The mix of an extensive slot database, ample customer rewards, and a clean design makes casino vinci spin a top pick for web-based betting. We recommend using the time to browse the tools available on their website to see why so countless players are switching to this lively gaming spot.

  8. В этой статье рассматриваются актуальные вопросы, связанные с развитием медицинской науки и её внедрением в повседневную практику. Особое внимание уделено вопросам профилактики, ранней диагностики и использованию технологий для улучшения здоровья человека.
    Подробности по ссылке – [url=https://tuning-center1.ru/kodirovka-ot-alkogolizma-mif-panatseya-ili-realnyy-shans-na-novuyu-zhizn/]эффективная кодировка от алкоголизма[/url]

  9. Вывод из запоя в клинике в Санкт-Петербурге осуществляется под круглосуточным медицинским контролем с применением современных методов инфузионной терапии, препаратов для восстановления обменных процессов и купирования синдрома отмены. Главной задачей врачей является восстановление баланса между физическим и психическим состоянием, предотвращение осложнений и стабилизация основных жизненных функций.
    Подробнее тут – [url=https://narkologicheskaya-klinika-v-spb16.ru/]наркологическая клиника вывод из запоя[/url]

댓글 달기

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