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”의 18,614개의 댓글

  1. chickenroad-phige

    Provided you find yourself seeking an thrilling and swift gaming adventure in Pakistan, the chicken road game is evolving into a preferred option with native users [url=https://chickenroad-pk-9.web.app]chicken road game online[/url] . By accessing the portal at chickenroad-pk-9.web.app, you are able to immerse into a realm of planning and chance that has captured the interest of numerous enthusiasts. This location offers a fluid interface where you might relish the chicken road online game from the ease of your residence. Whether you are a relaxed gamer or a seasoned expert, the game presents a special excitement that keeps you coming back for extra.

    Lots of participants seek for the real chicken road game to guarantee they are playing on a reliable domain. The release accessible at chickenroad-pk-9.web.app is crafted to be accessible, making sure that your moments dedicated to playing is both seamless and pleasant. If you have already tried the first one, you could additionally feel interested on testing chicken road 2, which delivers enhanced features and extra energetic play to the screen. The mechanics of the chicken road casino style of gaming are straightforward yet compelling, making it perfect for those who relish rapid turns and immediate excitement.

    Once you enter the chicken road game online, you find yourself entering a virtual space that prioritizes fun. The game chicken road has secured popularity due to the fact that it is straightforward to master however contains ample depth to keep things engaging. As a larger number of people discover the benefits of the chicken road casino experience, the group continues to grow throughout the land. If you are searching for a novel way to test your instincts, chickenroad is the perfect place to initiate your adventure. Keep in mind that as playing the chicken road game, regularity and endurance are key. Browse the webpage today to observe why so many members are discussing this compelling title. Become part of the excitement and check if you possess what it requires to traverse the path to victory in this captivating and trending title.

  2. Лечение в стационаре позволяет обеспечить постоянное медицинское наблюдение, расширенную диагностику и своевременное изменение назначений. Такой вариант особенно важен при длительном запое, выраженной абстиненции, тяжелых хронических заболеваниях, повторных срывах, психозе, судорожном синдроме или серьезном обезвоживании. В наркологической клинике специалисты могут контролировать состояние круглосуточно и быстрее реагировать на ухудшение показателей.
    Узнать больше – https://vyvod-iz-zapoya-reutov15-2.ru/

  3. BetAndPlay Casino is a popular online casino network that has earned significant notoriety among local bettors looking for a seamless and energising gaming journey [url=https://bet-and-play-62.web.app]Betandplay Casino[/url] .

    Whether you’re hunting BetAndPlay AU, or simply reading BetAndPlay Insights, this site delivers a variety of options and betting avenues structured for both occasional punters and skilled enthusiasts.

    With a clear emphasis on ease and engagement, BetAndPlay Casino has established itself as a top-tier destination for those seeking a secure virtual gaming experience.

    When considering Bet And Play Casino Review, it’s important to acknowledge that the platform features a easy-to-navigate interface, making it simple for players to traverse through different options, incentives, and playing avenues. The site features a comprehensive array of slot entertainment, table games, and real-time dealer options, confirming there’s something special for every gambler. Many BetAndPlay Feedback emphasise the network’s dedication to equity and protection, which is crucial for Australian players who prioritise ethical playing spaces.

    For those new to online betting, diving into Bet And Play Online Casino can be a excellent beginning point. The network is designed with a flexible layout, allowing gamblers to appreciate their loved games on the go. Whether you’re at home base or on the travel, the simplicity of logging into BetAndPlay Online AU ensures that you can lay bets on demand and in any location.

    One of the notable aspects of BetAndPlay Casino is its bonus deals, which often comprise launch bonuses, no-cost turns, and member schemes. These perks render it an appealing choice for those aiming to optimise their playing journey. Still, as with any online betting platform, it’s important to digest BetAndPlay Insights carefully to guarantee the platform aligns with your desires and requirements.

    In wrap-up, Betandplay is a esteemed web-based gaming platform in the Antipodes, providing a varied collection of games, competitive chances, and a intuitive experience. Whether you’re pursuing for Bet & Play Assessment perspectives or simply exploring BetAndPlay Web alternatives, this platform offers a strong ground for an memorable betting venture. Remember to play responsibly and leverage the resources at hand for secure and smart gambling.

  4. Le domaine des jeux de casino numérique ne finit de épater les utilisateurs avec des projets innovants et dynamiques [url=https://chicken-road-fr-39.annegarciaic366.workers.dev]chicken road[/url] . Au sein de les jeux qui retiennent à présent l’attention, le chicken road s installe comme une aventure essentielle pour les amateurs de sensations vives. Disponible via une application dédiée, ce loisir combine tension et méthode basique, présentant une alternative rafraîchissante aux machines à sous traditionnelles. Dans le cas où vous êtes à la quête du chicken road casino, sachez que le gameplay repose sur une mécanique fluide où chaque action influence pour accroître vos gains envisageables.

    Concernant ceux qui ont déjà goûté au charme de la initiale version, le chicken road 2 apporte son lot de retouches visuelles et de options bonus qui enrichissent le parcours totale. Le chicken road game est devenu en quelques mois une norme dans le éventail des jeux de crash. En tant que chicken road slot actuel, il charme par sa ambiance atypique et son rythme effréné. Le chicken road game casino fournit un espace protégé pour tous les internautes voulant vérifier leur bonne étoile avec ce jeu unique.

    Il est courant de observer les utilisateurs traquer le jeu chicken road sur internet pour apprendre comment optimiser leurs paris. La célébrité du chicken road jeu ne fait nulle doute, car il capte aussi bien les amateurs que les habitués des sites ciblés. La structure de chickenroad est élaborée pour apparaître intuitive tout en maintenant une part de énigme propre aux jeux de hasard. Bien que vous soyez attiré par l’aspect visuel ou par la volatilité du logiciel, ce titre procure une immersion totale. En étudiant les diverses alternatives disponibles sur le espace, vous saisirez vite pourquoi cette trésor créative est devenue populaire. N’oubliez pas de miser de sorte mesurée tout en appréciant de l’univers captivant que offre cette odyssée sur piste. C demeure sans aucun doute l’une des expériences les plus ludiques pour ceux qui veulent de quitter des sentiers battus dans le domaine du casino en ligne.

  5. If you are searching for a brand-new and engaging gaming destination, the Spinpin casino brand is rapidly turning into a hot trend among UK players [url=https://spinpin-8.onrender.com]spinpin casino review[/url] . This thorough Spinpin casino evaluation explores what makes this destination a standout choice for anyone seeking a reliable and enjoyable betting atmosphere. When you head over to the Spin pin main site, you are immediately greeted by a intuitive interface built for seamless navigation across computers and smartphones.

    The Spinpin online casino offers an vast collection of top-tier titles, ranging from traditional slots to engaging video slots and polished table games. Because the brand prioritises delivering a premium user experience, every session on the Spinpin casino site feels quick and safe. Regardless of if you are a novice or a veteran player, the game selection ensures that there is continual content to discover.

    Many users searching for a detailed Spinpin review appreciate the honesty and fair play standards upheld by the site. As mentioned within this Spin pin casino review, the operator prioritises player safety and fast payment handling. The sign-up procedure at Spinpin is straightforward, allowing you to dive into your favourite games without unnecessary delays. In addition, the commitment to providing a stable gaming atmosphere makes the Spin pin casino an attractive option for anyone who appreciates excellent games and expert customer service.

    In conclusion, the Spinpin gaming journey is characterised by its impressive catalogue and its contemporary approach to online gambling. If you have been looking for an engaging platform, the Spinpin online casino excels across the board, providing consistent performance and a wide range of beneficial chances. By exploring the Spin pin homepage today, you can see for yourself why players are increasingly choosing this brand. As with any site, we always recommend playing responsibly to guarantee your time spent at the Spin pin casino stays a enjoyable and rewarding experience. With its intuitive design and robust library, Spinpin is definitely a brand to keep an eye on in the industry.

  6. chickenroad-bleawn

    A clareza e a seguranca constituem bases fundamentais para a vivencia do jogador no Chicken Road, e e por esse motivo que a nossa Politica de Cookies desempenha um papel tao significativo [url=https://chickenroad-game.com.pt/politica-de-cookies]Chicken Road[/url] . Ao explorar no site ChickenRoad, certificamos que todas as praticas de recolha de dados respeitam criterios rigorosos para proporcionar um espaco de diversao equilibrado e adaptado. O proposito primordial da utilizacao de cookies no ChickenRoad e facilitar a circulacao e incrementar o funcionamento da pagina, permitindo que o sistema reconheca as preferencias particulares dos apostadores cada vez que estes regressam para uma nova sessao.

    Os cookies consistem em reduzidos arquivos de codigo armazenados no dispositivo do espectador que contribuem a entender como o site Chicken Road e utilizado, permitindo assim melhorar ferramentas e apressar o download de informacoes. Alguns cookies revelam-se imprescindiveis para o funcionamento primario, confirmando que as definicoes de perfil e as escolhas de lingua fiquem conservadas sem falhas. Alguns cookies facilitam a estudo estatistica, distribuindo dados valiosas que apoiam a equipa do ChickenRoad a aprimorar constantemente a dinamica e a layout, fazendo o entretenimento progressivamente envolvente.

    Na nossa Politica de Cookies, esclarecemos que a privacidade dos nossos frequentadores e protegida. O usuario tem total gestao acerca de estas regras por via das opcoes do seu explorador, sendo capaz de escolher pelo restringir ou apagar estes dados a qualquer momento, apesar de tal tenha o potencial de afetar determinadas ferramentas particulares do Chicken Road. A utilizacao destas tecnologias demonstra o nosso compromisso em manter um servico transparente e de alta qualidade. Ao continuar a visitar o ChickenRoad, o apostador aceita a utilizacao destas ferramentas, que revelam-se fundamentais para uma sessao de lazer digital de excelencia. Incentivamos todos os visitantes a consultarem com atencao a nossa regulamentacao para perceberem como protegemos os seus informacoes e como trabalhamos para tornar o passatempo Chicken Road uma referencia de protecao e entretenimento no mercado. A sua credibilidade e a nossa foco enquanto persistimos a desenvolver o superior ambiente de jogos online.

  7. Την διασκέδαση του διαδικτυακού παιχνιδιού έχει περάσει πλέον απευθείας στα παλάμες του χρήστη, χάρη στην κορυφαία πλατφόρμα που διαθέτει αυτό το online casino [url=https://spino-gambinologin.gr/app]spinogambino app λήψη[/url] . Εάν αναζητάτε έναν εξαιρετικά άμεσο συν σίγουρο μέσο προκειμένου να διασκεδάζετε με τις δημοφιλή σας slots οπουδήποτε κι αν είστε, για αυτό η app spinogambino αποτελεί ως τέλεια επιλογή. Σχεδιασμένη λόγω σκοπό τη ευχρηστία καθώς και τη αποδοτικότητα, η mobile app spinogambino δίνει τη δυνατότητα τους gamers για να σερφάρουν με μεγάλη άνεση στο περιβάλλον, να εκτελούν πληρωμές και να χαίρονται κάποια πληθώρα επιλογών.

    Η διαδικασία προκειμένου να αποκτήσετε είσοδο φαντάζει πολύ εύκολη. Για όσους διαθέτουν κινητά με λειτουργικό της Apple, το spinogambino iOS app παρέχει μια ομαλή και όμορφη αίσθηση, την ίδια στιγμή οι κάτοχοι κινητών της Google έχουν τη δυνατότητα εύκολα να πάρουν το spinogambino Android app προκειμένου να αρχίσουν το session τους. Η spinogambino app λήψη περαιώνεται σε ελάχιστα δευτερόλεπτα, χαρίζοντας ταχεία πρόσβαση στο profile εσάς αποφεύγοντας καθυστερήσεις.

    Το κυριότερο ανάμεσα σε τα βασικά θετικά ότι παρέχει το mobile casino spinogambino είναι αυτή η τεράστια συλλογή παιχνιδιών που παραμένουν ολοκληρωμένα βελτιστοποιημένοι μέσα σε displays αφής. Αυτά τα mobile slots spinogambino ξεχωρίζουν λόγω των εντυπωσιακά τους γραφικά, τους άμεσους ρυθμούς εκκίνησης συν την μέγιστη συμπεριφορά, είτε και αν βρίσκεστε στο δρόμο ή ακόμα και ξεκουράζεστε στον σπίτι εσάς. Δεν χρειάζεται χρειάζεται πια να παραμένετε δέσμιοι κοντά από έναν σταθερό desktop, επειδή η εφαρμογή μεταφέρει τη συνολική τη δράση του καζίνο στην χούφτα εσάς.

    Επιπρόσθετα, η ασφάλεια θεωρείται κορυφαία προτεραιότητα, με κρυπτογράφηση νέας τεχνολογίας που διασφαλίζει τις συναλλαγές και των προσωπικά σας πληροφορίες σε κάθε συνεδρία. Σε περίπτωση που θέλετε για να ανεβάσετε τον τρόπο που διασκεδάζετε και για να αποκτήσετε είσοδο μέσα σε μοναδικές προσφορές συν τα τα πιο μοντέρνα παιχνίδια, η εγκατάσταση της εφαρμογής είναι το σωστό ορθό στάδιο. Μην σπαταλάτε πλέον στιγμές, πάρτε την εφαρμογή άμεσα καθώς δείτε για ποιο λόγο είναι την κορυφαία επιλογή προς τους fans των τυχερών παιχνιδιών στην Ελλάδα, βιώνοντας διαρκή διασκέδαση μαζί με την ασφάλεια καθώς και την φερεγγυότητα της Spinogambino.

  8. chickenroad-neurb

    The entire realm of online gaming has observed a huge surge in interest for quick and lucrative adventures, and the chicken road game remains prominent as a special feature in this segment. If you are seeking an engaging site to prove your chance and tactics, the site situated at [url=https://chickenroad-pk-10.onrender.com]chicken road casino[/url] delivers a fluid interface built expressly for enthusiasts of this current title. Whether you are a novice or a seasoned player, the chicken road experience presents a mixture of thrill and potential winnings that maintains users returning for additional sessions.

    Many enthusiasts searching for a chicken road game online often look for a reliable setting to wager minus unnecessary hassles. This identified platform guarantees that the chicken road game stays available, effortless, and enjoyable. In contrast to typical arcade games, the systems contained in this edition embrace the famous chicken road casino style, where choices under pressure is the key to winning. Since the game is so intuitive, it has become a fixture for those who enjoy the traditional chicken road 2 style of play, which includes upgraded imagery and quicker reaction durations.

    If you are notably interested in the chicken road game casino experience, this site provides a ideal online playground to savor the thrill of the quest. You can start the game chicken road activity promptly skipping requiring you to download bulky data. Many players choose this chicken road online game as it copies the real feeling of a true chicken road game, providing a balanced session for portable and computer users equally. By selecting the best strategy, you can traverse the path and target improved results.

    For those who are often hunting for chickenroad news or wanting to perfect their abilities, visiting this designated portal is a fantastic way to hone your technique. Boasting a simple design, the chicken road platform on Render is adjusted for users in Pakistan who desire a stable and fun gaming session. Discover the thrill of the chicken road casino ambiance presently and see if you have the talent to reach the terminus of the path.

댓글 달기

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