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”의 95,968개의 댓글

  1. И руки трясутся с утра. А дела не ждут. Капельницы от похмелья — И человеку становится легче. Сначала уходит интоксикация. Капельница на дому Екатеринбург — работает и ночью. Рекомендую ознакомиться с источником: капельница на дому от похмелья [url=https://kapelnica.kapelnicza-ot-pokhmelya-ektb-xcj.ru]капельница на дому от похмелья[/url] Там и про капельницу от похмелья цена по городу. Иногда один звонок решает всё.

  2. wildrobin-Zectozy

    Wildrobin Casino is a trusted digital gaming platform that has captured considerable interest among British players searching for a reliable and exciting gaming experience [url=https://wildrobin-23.coderhazelnutsystemqjs0i606.workers.dev]wild robin casino review[/url] . Renowned for its wide array of games and user-friendly interface, Wildrobin Casino provides something for every type of gambler, from enthusiasts of slots to poker players and those who enjoy interactive gaming options. As one of the leading brands in the online gambling world, the platform has established a strong reputation for transparency, security, and competitive rewards. Whether you’re a beginner to digital gambling or a seasoned player, Wildrobin creates an fun-filled setting where you can appreciate premium entertainment with convenience.

    When exploring Wildrobin Casino reviews, many players emphasise its impressive selection of titles, which features elite slots like Starburst as well as classic picks such as Blackjack. The platform also boasts interactive games, enabling users to experience the adrenaline of on-the-fly interaction with professional dealers. For those desiring a seamless session, Wildrobin’s app ensures that players can access their favourite games anywhere, making it one of the top Wildrobin online options available.

    Safety and equity are key focuses at the platform, with strict licensing and government standards ensuring that all games are honest and unbiased. Players can rely on the fact that their money and personal information are secured by state-of-the-art encryption. Moreover, the casino provides attractive bonuses, including sign-up offers, free spins, and exclusive benefits, elevating the full gaming session. Whether you’re searching player opinions on the platform or simply wanting to examine a reliable site, Wildrobin stands out as a trustworthy option for UK gamblers.

    For those new with this casino, checking out testimonials can provide useful perspectives into the platform’s strengths, such as its assistance team, deposit methods, and selection of titles. Many players value the prompt and efficient help available, ensuring that any problems are fixed efficiently. With a emphasis on both fun and protection, this casino continues to be a preferred recommendation for those seeking a top-tier online casino experience in the Britain. Whether you’re playing for pleasure or striving for large jackpots, Wildrobin provides a comprehensive and thrilling gaming setting.

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

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

  5. wildrobin-chuse

    Wildrobin24.app is an digital hub dedicated to providing information and updates about the popular online casino called Wildrobin Casino [url=https://wildrobin-24.vercel.app]wild robin casino review[/url] . Whether you’re brand new in the world of online gambling or a experienced gambler searching for the newest developments, this site offers a valuable tool.

    Wildrobin Casino has attracted major focus in the British Isles and beyond borders, thanks to its wide array of games, attractive rewards, and intuitive design.

    One of the notable aspects of Wildrobin Casino is its huge collection of entertainment. Players can explore a wide array of slot machines, traditional games, and real-time choices, ensuring there’s an option for all. The casino’s reputation has been enhanced by excellent Wildrobin Casino feedback, where users consistently praise the seamless gameplay and honest payouts. Many Wildrobin Gaming testimonials also commend the site’s responsive client assistance, which is critical for resolving any concerns quickly.

    For those searching for a Wildrobin Casino assessment, Wildrobin24.app provides thorough and unbiased analyses. The site breaks down key elements such as promotional offers, options available, and security protocols, helping players make informed judgements. Whether you’re interested about the Wildrobin Gaming British journey or simply want to learn more about Wildrobin Gaming digitally, this site delivers clear and helpful details.

    Another standout aspect is the stress on transparency. Wildrobin24.app ensures that Wild Robin reviews are completely honest, giving players assurance in their choices. The site also covers the latest trends in online gambling, including bonuses and new game releases, making it a top place for lovers.

    If you’re hunting for a credible resource on Wildrobin Gaming testimonials, this resource excels for its thorough analysis. It’s particularly for those in the British Isles, where internet gambling platforms must comply with tight laws. By offering in-depth Wildrobin Casino assessments, the site helps players navigate the dynamic scenario with effortlessness.

    In summary, WildrobinInfo.net is an invaluable guide for anyone curious about Wild Robin Casino. Whether you’re looking for Wildrobin Gaming testimonials, pursuing the most enjoyable Wildrobin Gaming digital journey, or simply interested in dive into the world of digital betting, this site provides the information you require. With its emphasis on justice, selection, and user experience, Wildrobin Gaming continues to be a top-tier option for players in the United Kingdom and globally.

  6. wildrobin-Excusy

    Wildrobin Casino is an newly established virtual casino site that has captured noticed among UK gamblers seeking a dependable and fun betting venture [url=https://wildrobin-casino-6.pages.dev]wild robin reviews[/url] . Known as Wildrobin Casino, this casino delivers a combination of traditional and contemporary casino titles, catering to both first-timers and experienced gamblers. Whether you’re looking for Wildrobin digital choices or exploring Wild Robin casino feedback, grasping its perks and credibility is vital before you make a deposit.

    One of the standout highlights of Wild Robin Casino is its easy-to-navigate design, which ensures use straightforward for punters. The casino showcases a wide selection of slot options, blackjack titles, and live hosted alternatives, guaranteeing options for every choice. Many Wild Robin casino testimonials praise its seamless experience and responsive interface, making it a reliable choice for those hunting a uninterrupted experience. For UK players, Wild Robin casino UK is especially desirable due to its ease of use and compliance to UK gambling regulations.

    When reviewing Wildrobin testimonials, it’s necessary to note that punter stories can differ. Some Wild Robin casino feedback applaud the attractive rewards, while others imply that payout periods may consume a bit more time than anticipated. However, the general response tends to be positive, with many players enjoying the honest experience and safe transactions. If you’re hunting for a dependable Wildrobin digital website, reading up-to-date Wildrobin casino testimonials can guide you choose whether it fits with your expectations.

    For those unfamiliar with the company, Wild Robin Casino is a relatively recent entry in the online gambling world, but its growing demand suggests it’s deserving checking. Whether you’re contrasting Wildrobin casino reviews with other casinos or simply looking for a new Wildrobin online session, this casino delivers a reliable groundwork with constant upgrades. Always guarantee you gamble sensibly and avail benefit of any Wild Robin casino deals present to improve your pleasure.

  7. Помогаем быстро перейти от консультации к конкретному плану: выезд, стационар или наблюдение.
    Дополнительная информация – [url=https://vivod-iz-zapoya-voronezh17.ru/]https://vivod-iz-zapoya-voronezh17.ru[/url]

  8. wildrobin-Gauroma

    Wild Robin casino is an online gaming site that has earned noticed among gamblers hunting for a diverse array of gaming opportunities [url=https://wildrobin-casino-7.vercel.app]wild robin casino reviews[/url] . Known as Wild Robin Casino, this site provides a mix of slot, classic activities, and real-time dealer games, catering both casual and serious enthusiasts. Found at website URL, the site is structured to offer a seamless and entertaining player experience, though its trustworthiness and status still topics of discussion.

    For those exploring Wild Robin in the UK, it’s crucial to realise that digital casinos must comply tight guidelines in the Britain. While Wildrobin Casino asserts to deliver a variety of games, users should confirm its licensing and honest play policies before attempting any payments. Many gamblers hunting for feedback on Wild Robin often emphasise the platform’s game range, but concerns about protection and payout reliability are widespread. Wild Robin comments often refer the need for clarity, particularly relation to promotions and withdrawal procedures.

    Wildrobin online entertainment has experienced a increase in demand, but new gamblers should handle it with care. The Wild Robin review is divided, with some complimenting the entertainment quality while others warn about hidden dangers. Before signing up, it’s wise to inspect verified Wildrobin Casino feedback and verify the platform adheres to responsible playing rules. Users hunting for a trusted Wildrobin Casino UK session should emphasise certified sites with verified feedback.

    In finality, Wild Robin Casino delivers entertainment but requires detailed research. Whether you’re searching for Wild Robin Casino reviews or thinking about Wildrobin digital wagering, forever focus safety and legitimacy to prevent deceptions. Consistently wager responsibly.

  9. Интернет-магазин шины-киров.рф предлагает автомобильные шины и диски для любого сезона и бюджета. Ассортимент включает бренды Yokohama, Pirelli, Hankook, Kama, Viatti и десятки других изготовителей легковых, грузовых и спецтехнических покрышек. Оформить заказ и подобрать резину по размеру можно на сайте https://xn—-dtbqbjqkp0e6a.xn--p1ai/ прямо сейчас. Работает собственный шиномонтаж и удобная доставка по Кирову.

댓글 달기

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