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”의 67,760개의 댓글

  1. В этой публикации мы рассматриваем важную тему борьбы с зависимостями, включая алкогольную и наркотическую зависимости. Мы обсудим методы лечения, реабилитации и поддержку, которые могут помочь людям, столкнувшимся с этой проблемой. Читатели узнают о перспективах выздоровления и важности комплексного подхода.
    Нажми и узнай всё – [url=https://alkogolikum.ru/stati/pochemu-vazhno-uchastvovat-v-semeynoy-terapii-pri-reabilitacii-zavisimyh.html]наркология[/url]

  2. In case you are hunting for an dynamic and rapid gaming journey, the chicken road mr q title is quickly becoming a popular choice between online gamers [url=https://chicken-road-logincasino.com/mrq]chicken road mr q casino[/url] . Accessible on the dedicated portal, this unique release combines basic functions along with major thrills. Many players access chicken road mr q casino to examine their strategy and destiny in this current digital task. The foundation is straightforward, demanding participants to steer their hero securely across a path, nevertheless the intensity rises with every winning progression.

    Once you choose to interact with the chicken road game mr q, you are going to observe the modern design that makes browsing seamless. Even you are a amateur or a seasoned pro, the chicken road slot mr q offers an simple layout that secures you spend greater hours centered on your selections and lower time stressing about intricate buttons. For those keen to plunge towards the play, the chicken road mr q play mode is highly optimized for both computer and handheld gadgets, providing flexibility for playing while traveling.

    Many people hunting for the chicken road gambling game mr q admire the clarity and the dynamic nature of the spins. Because it stands out away from classic reels, the mr q chicken road experience delivers a new break of pace for those exhausted of regular slots. When you wish to perfect your plan preceding betting genuine cash, you may locate resources to test the chicken road mr q free versions to gain a sense for the beat and speed of the play.

    Finally, the popularity of the chicken road mr q game is a sign to its alluring style and the reliability of the gaming network. Should you are prepared to check if you might hit the far side without harm, go to the portal today. Remember to constantly bet wisely and enjoy the adrenaline that results from any turn of this famous offering. Join the circle of enthusiasts currently discovering the action of this excellent entertainment selection.

  3. В данной статье мы акцентируем внимание на важности поддержки в процессе выздоровления. Мы обсудим, как друзья, семья и профессионалы могут помочь тем, кто сталкивается с зависимостями. Читатели получат практические советы, как поддерживать близких на пути к новой жизни.
    Получить полную информацию – [url=https://new-narkolog.ru/stati/programmy-gosudarstvennoy-podderzhki-dlya-vyzdoravlivayuschih-zavisimyh/]лечение алкоголизма в стационаре[/url]

  4. Пил неделю, потом резко бросил. Ни спать, ни есть. Вывод из запоя на дому — Осматривает, ставит систему. Сначала уходит интоксикация. Выведение из запоя Воронеж — работает и ночью. Вся информация доступна здесь: капельница против похмелья [url=https://narkolog.kapelnicza-ot-zapoya-vrn-kxv.ru]https://narkolog.kapelnicza-ot-zapoya-vrn-kxv.ru[/url] И про срочный выезд для нашего города. Обращайтесь к специалистам.

  5. ohmyspins3-Whoni

    Wer auch immer auf der Suche nach einem zeitgemassen und spannenden Online Casino ist, findet unverzuglich uber den Namen ohmyspins [url=https://oh-my-spins-3.pages.dev]recensione ohmyspins[/url] . Die Gaming-Seite, die anzutreffen ist, hat sich in der Welt der digitalen Glucksspiele langst einen guten Ruf erarbeitet. In dieser grundlichen recensione ohmyspins werfen wir einen genaueren Blick darauf, was Gamer von diesem Betreiber antreffen werden. Das Layout der Seite ist modern und benutzerfreundlich, sodass sich auch Neulinge umgehend orientieren. Wenn man die vielen oh my spins erfahrungen studiert, erkennt man zugig, dass das Angebot an Slots und Live Casino Tischen beeindruckend ist. Ein wesentlicher Punkt, der oft in einer ohmyspins erfahrungen Analyse unterstrichen wird, ist die Bandbreite der Software-Hersteller. Ob Retro-Spielautomaten oder moderne Video-Slots mit aufwendigen Animationen, das oh my spins casino bietet fur jeden Geschmack die passende Unterhaltung. Ein anderer bedeutender Aspekt fur Kunden ist die Transaktionssicherheit. Die ohmyspins auszahlung verlauft in der Mehrheit der Falle zugig und sicher, was das Renommee der Nutzerbasis dauerhaft untermauert. Falls man das casino ohmyspins besucht, nutzt ausserdem von attraktiven Bonusaktionen, die den Start spurbar verbessern. Auch bei den oh my spins casino recensioni wird wiederholt die Offenheit des Anbieters gepriesen. User mogen es, wenn sie sich auf eine faire Spielumgebung vertrauen konnen. Das oh my spins casino ist heutzutage eine fester Bestandteil fur Spieler, die Wert auf eine umfangreiche Selektion und kurze Wartezeiten legen. Abschliessend lasst sich sagen, dass das ohmyspins casino eine exzellente Wahl fur alle ist, die neue Herausforderungen suchen. Die Mischung aus einer benutzerfreundlichen Struktur, einem breiten Spielsortiment und einer verlasslichen ohmyspins auszahlung macht die Webseite zu einem Top-Kandidaten fur das nachste Game-Session. Wer sich selbst ein einen Eindruck verschaffen will, findet auf der besagten Homepage alle erforderlichen Details. Es zahlt sich aus, das Sortiment zu prufen und die eigenen oh my spins erfahrungen zu gewinnen, um von den gerechten Regeln und dem tollen Spielkatalog zu nutzniessen.

  6. spinogambino-eagelty

    As soon as you interact with digital portals, grasping how your private data is processed is crucial for a protected experience [url=https://spinogambino-casinogame.com/privacy-policy]spinogambino[/url] . The data protocol at spinogambino-casinogame.com describes the stringent standards enforced to guarantee that every member activity remains guarded. By valuing clarity, the team operating spino gambino shows a definite dedication to safeguarding the identifiable data and online presence of every one of its guests.

    The policy specifies accurately how the webpage gathers, saves, and uses statistics to enhance your complete entertainment session. As you browse through spinogambino, particular system details is harvested to refine performance and guarantee that the platform operates smoothly on various device. This data collection is conducted with rigid alignment to industry rules, ensuring that your confidentiality is never endangered for the benefit of platform speed. Moreover, spino gambino employs advanced coding technologies to defend sensitive records from restricted entry, providing assurance to those who enjoy the service functions.

    Transparency stays a foundational principle of the spinogambino brand. The privacy policy explicitly declares that your private details are handled with the greatest confidentiality and are rarely shared with outside groups lacking your express consent, barring required by official mandates. Players are advised to review these conditions periodically to stay informed concerning any updates regarding data handling procedures. By supplying this insight upfront, the site empowers you to reach informed conclusions regarding your virtual behavior.

    Provided you occasionally hold worries about how your records is processed, the assistance methods offered by the site are available to help you. Preserving confidence is the main aim, and the agreement functions as a bridge between the provider and the player. Even if you are a constant user or a first-time guest, comprehending the actions taken at spinogambino ensures that your concentration continues fully on the fun of the games. By emphasizing information protection and client privileges, the service establishes a strong benchmark for safety in the digital gaming market.

  7. chickenroad-Uphorp

    ¿Es verídico el diversión *Chicken Road* o únicamente una trampa? Esta duda ha creado mucha atención en los pasados meses, notoriamente después de que el fenómeno *Chicken Road* se convertirse de moda en plataformas virtuales [url=https://chickenroad-es-55.vercel.app]Chicken Road Es Real?[/url] .

    Numerosos jugadores se reflexionan si este juego es real o si se trata exclusivamente engaño disfrazado de ocio. En este reportaje, revisaremos qué representa precisamente *Chicken Road*, a través de qué método se desarrolla y si realmente compensa la pena jugarlo.

    *Chicken Road* es un aplicación de realidad mixta (RA) que recrea una situación de pilotaje en una vía digital, donde los usuarios deben eludir chocar con otros vehículos o viandantes.

    La app, accesible en redes como Vercel, ha sido descargada por muchos de visitantes, pero su autenticidad ha sido analizada en revisión. Algunos usuarios comentan que es un juego real con sistemas de pilotaje, mientras que determinados imaginan que es una fraude o un maniobra para extraer registros personales.

    Lo que más confunde a los visitantes es si *Chicken Road* es legítimo o ficticio. La realidad es que, aunque el servicio contiene elementos de simulación aumentada, no es una recreación de maniobra avanzada como los juegos de desafíos convencionales. Más bien, se presenta una situación participativa diseñada para divertir, aunque algunos usuarios han comentado incidencias de confidencialidad y publicidad agresiva. Por esto, muchos se dudan: ¿Vale la inversión usar *Chicken Road* o es solo una trampa?.

    Si consideras jugarlo, es necesario saber en cuenta que, aunque no es un aplicación peligroso como algunos imaginar, no resulta alejado de riesgos. Algunos visitantes han expuesto opiniones desagradables, como la repetición de alertas intrusivas o la sensación de que el juego no cumple con todo prometido. Por esto, antes de descargarlo, es recomendable analizar a fondo y consultar opiniones de otros participantes.

    En resumen, *Chicken Road* no es un servicio de pilotaje confiable en el concepto convencional, pero tampoco es una fraude absoluta. Es una situación interactiva que puede ser entretenida para algunos, aunque con algunas restricciones. Si te llama descargarlo, verifica de ejecutarlo con atención y sin transmitir detalles sensible. Al cierre, la resolución de jugar recae de vos, pero es importante permanecer consciente antes de comprometerse en este fenómeno viral.

  8. В этом исследовании рассмотрены методы лечения зависимостей и их эффективность. Мы проанализируем различные подходы, используемые в реабилитационных центрах, и представим данные о результативности программ. Читатели получат надежные и научно обоснованные сведения о данной проблеме.
    Только факты! – [url=https://e-marcet.ru/kapelniczy-ot-pohmelya-informacziya-ob/]Вывод из запоя в Балашихе[/url]

  9. Читатели получат представление о том, как современные технологии влияют на развитие медицины. Обсуждаются новые методы лечения, персонализированный подход и роль цифровых решений в повышении качества медицинских услуг.
    Погрузиться в детали – [url=https://alko-narko.info/alkogolizm/psihologicheskoe-kodirovanie.html]реабилитация наркозависимых[/url]

댓글 달기

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