jpablog : 요청 주소 변경
This commit is contained in:
@@ -5,7 +5,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
|
||||
@GetMapping("/joinForm")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
server:
|
||||
port: 8080
|
||||
servlet:
|
||||
context-path: /jpablog
|
||||
context-path: /
|
||||
encoding:
|
||||
charset: UTF-8
|
||||
enabled: true
|
||||
|
||||
@@ -15,14 +15,14 @@ let index = {
|
||||
};
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/jpablog/api/user",
|
||||
url: "/api/user",
|
||||
data: JSON.stringify(data),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json"
|
||||
}).done(function (resp){
|
||||
console.log(resp);
|
||||
alert("회원가입이 완료되었습니다.");
|
||||
location.href = "/jpablog";
|
||||
location.href = "/";
|
||||
}).fail(function (error){
|
||||
alert(JSON.stringify(error));
|
||||
});
|
||||
@@ -34,12 +34,12 @@ let index = {
|
||||
};
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/jpablog/api/user/login",
|
||||
url: "/api/user/login",
|
||||
data: JSON.stringify(data),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
dataType: "json"
|
||||
}).done(function (resp){
|
||||
location.href = "/jpablog";
|
||||
location.href = "/";
|
||||
}).fail(function (error){
|
||||
alert(JSON.stringify(error));
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
|
||||
<a class="navbar-brand" href="${pageContext.request.contextPath}">블로그</a>
|
||||
<a class="navbar-brand" href="/">블로그</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@@ -24,23 +24,23 @@
|
||||
<c:when test="${empty sessionScope.principal}">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/loginForm">로그인</a>
|
||||
<a class="nav-link" href="/loginForm">로그인</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/joinForm">회원가입</a>
|
||||
<a class="nav-link" href="/joinForm">회원가입</a>
|
||||
</li>
|
||||
</ul>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/writeForm">글쓰기</a>
|
||||
<a class="nav-link" href="/board/form">글쓰기</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/userForm">회원정보</a>
|
||||
<a class="nav-link" href="/user/form">회원정보</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="${pageContext.request.contextPath}/user/logout">로그아웃</a>
|
||||
<a class="nav-link" href="/logout">로그아웃</a>
|
||||
</li>
|
||||
</ul>
|
||||
</c:otherwise>
|
||||
|
||||
@@ -20,5 +20,5 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="${pageContext.request.contextPath}/js/user.js"></script>
|
||||
<script src="/js/user.js"></script>
|
||||
<%@include file="../layout/footer.jsp"%>
|
||||
@@ -21,5 +21,5 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="${pageContext.request.contextPath}/js/user.js"></script>
|
||||
<script src="/js/user.js"></script>
|
||||
<%@include file="../layout/footer.jsp"%>
|
||||
Reference in New Issue
Block a user