반응형
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
- msa개념
- 리액트프로젝트
- CSS
- 코드잇
- jvm메모리구조
- 웹개발기초
- two pointers
- mysql
- C
- SpringFramework
- microservices
- Programming
- 밤비노
- jsp
- Java
- Bambino
- coding test
- 웹개발자
- html
- MSA
- MVC
- job
- BCIT
- servlet
- sql
- 웹개발
- 데이터베이스
- 자바
- DB
- 안드로이드
Archives
- Today
- Total
초보 개발자의 기록
관리자모드-상품관리 페이지 만들기 본문
728x90
www.w3schools.com/howto/tryit.asp?filename=tryhow_css_table_zebra
Tryit Editor v3.6
table { border-collapse: collapse; border-spacing: 0; width: 100%; border: 1px solid #ddd; } th, td { text-align: left; padding: 16px; } tr:nth-child(even) { background-color: #f2f2f2; } Zebra Striped Table For zebra-striped tables, use the nth-child() sel
www.w3schools.com
ProductController.java
상품을 관리하는 컨트롤러
반환형 : 가져갈것이있으면 ModelAndView(포워딩)
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;
}
//상품 상세
//상품 등록
//상품 수정
//상품 삭제
}
product_list.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" %>
</head>
<body>
<%@ include file="../inc/main_navi.jsp"%>
<h3>상품목록</h3>
<p>
<table>
<tr>
<th>No</th>
<th>이미지</th>
<th>카테고리명</th>
<th>상품명</th>
<th>가격</th>
<th>브랜드</th>
</tr>
<tr>
<td>1</td>
<td>1.jpg</td>
<td>카테고리</td>
<td>니트</td>
<td>200000</td>
<td>POLO</td>
</tr>
<tr>
<td colspan="6">
<button>상품등록</button>
</td>
</tr>
</table>
</p>
</body>
</html>
main_navi.jsp
<a href="/admin/product/list">상품관리</a>
<%@ page contentType="text/html;charset=UTF-8"%>
<div class="navbar">
<a href="/admin">Home</a>
<a href="/admin/product/list">상품관리</a>
<div class="dropdown">
<button class="dropbtn">주문관리
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">회원관리
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</div>
<div class="dropdown">
<button class="dropbtn">고객센터
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="#">Link 1</a>
<a href="#">Link 2</a>
<a href="#">Link 3</a>
</div>
</div>
</div>
table.css
resources>admin>table.css
table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
border: 1px solid #ddd;
}
th, td {
text-align: left;
padding: 16px;
}
tr:nth-child(even) {
background-color: #f2f2f2;
}
순방향(의존성이 낮은 순서): 컨트롤러->서비스->DAO->MyBatis/jdbc
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 |