반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- two pointers
- BCIT
- DB
- 밤비노
- coding test
- jsp
- 웹개발자
- microservices
- msa개념
- Java
- mysql
- C
- CSS
- 코드잇
- 리액트프로젝트
- jvm메모리구조
- servlet
- job
- 안드로이드
- sql
- Programming
- 웹개발
- MVC
- html
- MSA
- 데이터베이스
- SpringFramework
- 자바
- 웹개발기초
- Bambino
Archives
- Today
- Total
초보 개발자의 기록
관리자모드-상품등록 페이지 만들기 본문
728x90
ProductController.java
package com.study.fashionshopapp.controller.admin;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
//관리자 모드에서의 상품에 대한 요청 처리
@Controller
public class ProductController {
//상위 카테고리 가져오기
//하위 카테고리 가져오기
//상품 목록
@RequestMapping(value="/admin/product/list", method=RequestMethod.GET)
public ModelAndView getProductList() {
ModelAndView mav = new ModelAndView("admin/product/product_list");
return mav;
}
//상품 등록 폼
@RequestMapping(value="/admin/product/registform")
public String registForm() {
return "admin/product/regist_form";
}
//상품 상세
//상품 등록
//상품 수정
//상품 삭제
}
regist_form.jsp
<%@ page contentType="text/html;charset=UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="../inc/header.jsp" %>
<style>
input[type=text], select, textarea {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
resize: vertical;
}
input[type=button] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=button]:hover {
background-color: #45a049;
}
.container {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
</style>
<script type="text/javascript">
$(function(){
CKEDITOR.replace("detail");
});
</script>
</head>
<body>
<%@ include file="../inc/main_navi.jsp"%>
<h3>글등록 폼</h3>
<div class="container">
<form>
<select>
<option>상위 카테고리 선택</option>
</select>
<select>
<option>하위 카테고리 선택</option>
</select>
<input type="text" name="title" placeholder="상품명">
<input type="text" name="writer" placeholder="가격">
<input type="text" name="writer" placeholder="브랜드">
<!-- 파일 최대 4개까지 지원 -->
<p>대표 이미지:<input type="file"></p>
<p>추가 이미지:<input type="file"></p>
<p>추가 이미지:<input type="file"></p>
<p>추가 이미지:<input type="file"></p>
<p>추가 이미지:<input type="file"></p>
<!-- 지원 사이즈 선택 -->
<P>
XS<input type="checkbox">
S<input type="checkbox">
M<input type="checkbox">
L<input type="checkbox">
XL<input type="checkbox">
XXL<input type="checkbox">
</P>
<P>
color picker
</P>
<textarea id="detail" name="detail" placeholder="상세정보" style="height:200px"></textarea>
<input type="button" value="글등록" onClick="regist()">
<input type="button" value="목록보기" onClick="location.href='/client/notice/list'">
</form>
</div>
</body>
</html>
name=전송파라미터
id = 스타일시트 제어
728x90
반응형
'SpringFramework > FashionShop' 카테고리의 다른 글
관리자모드-상품등록 페이지 개발 순서 (0) | 2021.01.07 |
---|---|
관리자모드-상품관리 페이지 만들기 (0) | 2021.01.06 |
관리자모드-메인페이지 만들기 (0) | 2021.01.06 |
스타일적용 & include 지시어 사용한 중복코드 jsp분리 (0) | 2021.01.06 |
Oracle 이용한 DataBase 설계 (0) | 2021.01.05 |