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”의 79,837개의 댓글

  1. После списка важно подчеркнуть: вывод из запоя не должен превращаться в самолечение. Если пациент принимает препараты постоянно, врачу необходимо сообщить названия и дозировки, но самостоятельно повторять чужие назначения нельзя. Лечение подбирается индивидуально.
    Узнать больше – https://vyvod-iz-zapoya-krasnoyarsk67.ru/

  2. Этот обзор содержит информацию о передовых достижениях в области медицины. Мы разберем инновационные технологии, которые меняют подход к лечению и диагностике, а также их влияние на эффективность оказания медицинской помощи.
    Ознакомиться с деталями – [url=https://ego-yuriie.ru/vyvod-iz-zapoya-na-domu-v-borisoglebske-2/]delta clinic ru борисоглебск[/url]

  3. gtbetcasino49-arrict

    GT Casino es una alternativa muy valorada casinos online que ha aumentado su relevancia en los períodos recientes, en particular entre los entusiastas del casino en España [url=https://gt-bet-casino-49.onrender.com]Gt Bet España[/url] .

    Sin cuestion, antes de registrarte GT Bet Casino, resulta esencial evaluar sus particularidades, las opiniones de otros usuarios, y si satisface con los requisitos legales en España. En este informe, compartimos una evaluación completa sobre BetGT, sus aspectos positivos, riesgos potenciales, y si merece un entorno confiable para jugar en línea.

    el casino GTbet en el país ofrece como una opción para aficionados a las apuestas que buscan juegos variados, que van desde el juego de ruleta y blackjack y llegando a máquinas tragaperras y apuestas deportivas. Una de las primeras preguntas que se plantean al discutir este casino es si GT Bet es legal en España . No obstante, no está regulado por el organismo local, opera bajo licencias internacionales, esto asegura que los clientes utilicen sus funcionalidades.

    No obstante, resulta imprescindible saber que las actividades de casino en línea están sujetas leyes aplicables, y no obstante no es vetado, los no adultos no deben participar en él.

    Sobre la valoración de GT Bet, los usuarios señalan su interfaz intuitiva y la amplia variedad alternativas de apuesta. La mayoría de los clientes aprecian las promociones iniciales, entre ellos bonos de entrada y giros libres, los cuales aumentan maximizar las oportunidades de victoria en la fase inicial. No obstante, algunas opiniones de GT Bet indican que los requisitos de los premios se presentan engorrosos, especialmente cuando hablamos de los requisitos de apuesta (wagering requirements). Esto implica algo a tener en cuenta al realizar el primer depósito.

    La fiabilidad de GT Bet consta como un aspecto habitual en las reseñas. No obstante no se registran quejas colectivas por engaños, varios apostadores han mostrado escepticismo respecto a la eficiencia de los retiros. En consecuencia, debe consultar reseñas de GT Casino de otros apostadores al momento de apostar. Si deseas una plataforma con buena reputación, igualmente puedes analizarla junto a otras plataformas entre ellos GT Casino, los cuales brindan experiencias similares con enfoques diferentes.

    En resumen, GT Casino constituye un recurso llamativo para quienes buscan entretenimiento y abundancia en juegos de azar, aún así debe investigar adecuadamente previo a la inscripción. Verifica siempre si BetGT es seguro según las opiniones de otros usuarios y confirma que respetas las leyes vigentes. Antes de apostar, recuerda consultar las valoraciones actuales con el objetivo de actuar con inteligencia.

  4. Первые проявления абстиненции могут казаться обычным похмельем, однако их выраженность иногда нарастает в течение нескольких часов. Особенно опасен резкий отказ от спиртного при длительном запое и наличии заболеваний внутренних органов. Врач должен исключить состояния, требующие экстренного вмешательства.
    Ознакомиться с деталями – [url=https://vyvod-iz-zapoya-v-ekaterinburge18.ru/]вывод из запоя на дому недорого Екатеринбург[/url]

  5. Помощь при запое актуальна, когда запой продолжается и самостоятельный выход становится затруднительным. Врач оценивает общее самочувствие, врач уточняет длительность запоя и врач выбирает лечение. Наркологическая помощь может включать вывод запоя, наблюдение, терапию и решение вопроса о дальнейшем лечении алкоголизма. Следует не смешивать вывод с полным лечением зависимости: вывод относится к текущему запою, а лечение алкоголизма требует отдельного плана.
    Подробнее – [url=https://vyvod-iz-zapoya-krasnoyarsk70.ru/]наркология вывод из запоя в Красноярске[/url]

  6. Эта статья освещает различные аспекты освобождения от зависимости и пути к выздоровлению. Мы обсуждаем важность осознания своей проблемы и обращения за помощью. Читатели получат практические советы о том, как преодолевать трудности и строить новую жизнь без зависимости.
    Углубить понимание вопроса – [url=https://gob03.ru/stati/effektivnye-metody-lecheniya-alkogolizma-put-k-novoy-zhizni/]наркологическая клиника дельта в борисоглебске[/url]

  7. spinogambino-FraullY

    Caso seja um fa de jogos de cassino online em Portugal, sem duvida ja ouviu falar das otimas oportunidades oferecidas pela plataforma [url=https://spinogambino-casino.com.pt/bonuses]spino gambino bonus code[/url] . Ao explorar a pagina oficial, encontrar o spinogambino bonus ideal pode ser o diferencial que voce precisa para aumentar suas chances de ganho. A variedade de promocoes disponiveis permite que apostadores iniciantes e experientes aproveitem ao maximo cada rodada, aumentando consideravelmente o seu saldo inicial.

    Um dos pontos mais procurados pelos usuarios e o bonus sem deposito do spino gambino, uma otima forma de explorar o catalogo de jogos sem precisar realizar um investimento imediato. Adicionalmente, utilizar o codigo de bonus spino gambino correto no momento do seu registo ou deposito pode desbloquear vantagens exclusivas, como jogadas gratis ou creditos adicionais. E essencial estar sempre atento a secao de promocoes do site, pois um spino gambino bonus code pode expirar ou ser atualizado periodicamente.

    Para quem quer otimizar a experiencia, usar o bonus spino gambino disponivel e um passo tatico. Quer seja por meio de um codigo de bonus spinogambino ou inserindo um codigo promocional spino gambino durante o processo de pagamento, as recompensas sao criadas para oferecer mais entretenimento. Nao se esqueca de verificar o spino gambino codigo promocional que pode estar disponivel em campanhas sazonais. Ao aplicar qualquer codigo de bonus spino gambino, tenha em atencao de ler os regras e regulamentos aplicaveis a cada oferta.

    Os bonus spinogambino sao reconhecidos pela sua clareza e simplicidade na obtencao, tornando a jornada do jogador fique muito mais dinamica. Nao importa de ser um bonus de registo ou uma oferta recorrente, garantir o seu spino gambinos bonus e simples e direto. Desfrute agora mesmo para verificar todas as ofertas ativas na pagina dedicada aos bonus do cassino e comece a sua trajetoria com o pe direito, aproveitando cada vantagem competitiva que a plataforma oferece para os seus jogadores portugueses.

  8. spinogambino-Acouro

    A development of virtual gaming platforms has provided several engaging choices to users, and spinogambino has quickly appeared as a standout destination for those searching for a superior adventure [url=https://spinogambino-app.com]spinogambino official website[/url] . As a comprehensive center for play fans, the spinogambino official website offers a smooth layout that mixes entertainment with cutting-edge innovation. If you are a fan of classic slots or contemporary card games, the variety offered by this site is crafted to cater to each type of user.

    When entering the spinogambino online casino, players are quickly amazed by the intuitive navigation and the extensive database of slots available. The site prides itself on providing a protected environment where members can relish spinogambino casino online features with complete confidence. By focusing on high-definition art and seamless functionality, the developers supporting spino gambino have ensured that the site continues fast on both computer and mobile devices.

    For individuals who enjoy the thrill of real-time play, the spinogambino live casino area is a essential spot. It delivers the genuine vibe of a physical gaming room right to your screen, showcasing professional hosts and participatory turns. Beyond typical betting, the hub further presents sturdy spinogambino betting choices, letting sports buffs to engage with their favorite matches. This flexibility is exactly why so countless users choose spinogambino as their chief gaming venue.

    Security and fairness remain at the core of the journey at casino spinogambino. The group strives to uphold transparency, guaranteeing that each round and each bet is processed with fairness. If you are seeking a trustworthy and fun spinogambino online session, it is crucial to reach the official hub to guarantee you are getting the greatest bonuses and functions. With its commitment to customer satisfaction, spino gambino casino persists to set high benchmarks in the field. Regardless of you are exploring the fresh titles or taking part in the spinogambino live casino session, you are sure to uncover boundless entertainment and excitement adapted to your personal gaming preferences.

  9. Die Welt der Handy-Games wachst stetig, und immer mehr Spieler wunschen sich eine erstklassige Moglichkeit, ihre bevorzugten Games unterwegs zu genie?en [url=https://need-for-slotsapp.de/app]casino needforslots app[/url] . Genau hier setzt die need for slots app ein, die sich als feste Gro?e fur Fans von Online Slots bewahrt. Wenn Sie nach einer einfach zu bedienenden und stabilen Plattform suchen, ist die needforslots app die perfekte Wahl. Mit der need for slots casino app erhalten Nutzer sofortigen Zugang auf ein umfangreiches Portfolio an vielfaltigen Slots, die gezielt fur mobile Endgerate optimiert wurden.

    Wer die Vorteile einer optimierten App liebt, wird von der casino need for slots app begeistert sein. Die Installation ist kinderleicht, sodass man nach dem need for slots app herunterladen direkt in das Geschehen starten kann. Viele Nutzer fragen sich, wie sie den Zugang am schnellsten erhalten. Das need for slots herunterladen erfolgt unkompliziert uber die Hauptseite. Fur Android-Nutzer ist zudem die needforslots apk eine beliebte Option, da sie eine schlanke und fixe Installation ermoglicht. Auch die Suche nach der need for slots apk hilft zuverlassig, um das komplette Game-Erlebnis auf das Mobilgerat zu bringen.

    Die casino needforslots app zeichnet sich durch einer ubersichtlichen Benutzeroberflache und kurze Ladezeiten auf, was sie von vielen browserbasierten Angeboten unterscheidet. Ob Sie nun klassische Fruchte-Slots oder aktuelle Video-Slots mogen, die needforslots casino app liefert fur jeden Geschmack die passende Auswahl. Sicherheit und Datenschutz haben immer Prioritat, sodass Sie sich komplett auf den Zockerspa? konzentrieren konnen. Wer sich fur die need for slots app entschlie?t, setzt auf eine moderne Losung, die den Standard fur mobile Casino-Unterhaltung ma?geblich pragt. Starten Sie noch heute und sehen Sie selbst, warum so viele Spieler auf die Qualitat der need for slots casino app vertrauen. Die perfekte Einbindung und die standigen Aktualisierungen garantieren, dass keine Langeweile aufkommt und Sie immer Zugriff zu den aktuellsten Games haben. Profitieren Sie von der Flexibilitat und erleben Sie die Moglichkeit, uberall zu zocken.

댓글 달기

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