Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleBootstrap

https://getbootstrap.com/

Starter template

...

https://getbootstrap.com/docs/4.3/getting-started/introduction/

iconfalse

Status
subtletrue
colourRed
titleCritical

spring-boot-starter-web 의존성을 추가하면, Netty서버가 아닌 Tomcat서버가 구동됩니다.

Tomcat서버가 구동된다면, WebFlux의 장점인 Non-Blockimg I/O의 장점을 잃게 되므로, 적절치 않습니다.


결론, WebUI를 추가해야 한다면, 별도의 Spring MVC프로젝트로 만드는 것이 좋습니다.

Info

Children Display

개발할 WebUI

Image Added

리펙토링 개요

Info
iconfalse
Info

수정될 파일

추가될 파일

src

  • main
    • java
      • com.example.demo
        • DemoApplication
        • Link
        • LinkController
        • LinkRepository
        • LinkService
        • RedisConfiguration
        • RedisLinkRepository
        • WebController
    • resources
      • application.properties
      • static
        • index.html
      • templates
        • home.html
  • mvnw
  • lombok.config
  • pom.xml
Info
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

    <title>Hello, world!</title>
  </head>
  <body>
    <h1>Hello, world!</h1>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  </body>
</html>

NavBar

<nav class="navbar navbar-light bg-light"> <a class="navbar-brand">Navbar</a> <form class="form-inline"> <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search"> <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> </form> </nav>
Info

https://getbootstrap.com/docs/4.3/components/navbar/

Info