jpablog : index page
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.example.jpablog.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
@Controller
|
||||
public class BoardController {
|
||||
|
||||
@GetMapping("/")
|
||||
public String index() {
|
||||
return "index";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.example.jpablog.controller;
|
||||
|
||||
public class UserController {
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class User {
|
||||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) // 프로젝트 에서 연결된 DB의 넘버링 전략 사용
|
||||
private Long id;
|
||||
|
||||
@Column(nullable = false, length = 30)
|
||||
@Column(nullable = false, length = 30, unique = true)
|
||||
private String username;
|
||||
|
||||
@Column(nullable = false, length = 100)
|
||||
|
||||
48
jpablog/src/main/webapp/WEB-INF/views/index.jsp
Normal file
48
jpablog/src/main/webapp/WEB-INF/views/index.jsp
Normal file
@@ -0,0 +1,48 @@
|
||||
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Bootstrap Example</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
|
||||
<a class="navbar-brand" href="${pageContext.request.contextPath}">블로그</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="collapsibleNavbar">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/login">로그인</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/join">회원가입</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<br>
|
||||
|
||||
<div class="container">
|
||||
<div class="card m-2">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">제목</h4>
|
||||
<p class="card-text">내용</p>
|
||||
<a href="#" class="btn btn-primary">상세보기</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jumbotron text-center" style="margin-bottom:0">
|
||||
<p>😁 Create by</p>
|
||||
<p>📞 010-1234-1234</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
hello
|
||||
Reference in New Issue
Block a user