add build.gradle dependencies(gson,poi,poi-ooxml) please refresh gradle

This commit is contained in:
Kana
2024-01-03 16:50:18 +09:00
parent 28eecf0f24
commit dac2f36cea
6 changed files with 44 additions and 4 deletions

View File

@@ -15,7 +15,17 @@ public class CategoryController {
@Autowired
CategoryService categoryService;
// 테스트
@GetMapping("/category/test")
public String testpage(Model m) {
List<CategoryDto> dto = categoryService.selectAllCategory();
m.addAttribute("dto", dto);
return "category/test";
}
// 카테고리 리스트 출력
@GetMapping("/category/list")
public String list(@RequestParam(name="p", defaultValue = "1")int p, Model m) {

View File

@@ -10,7 +10,7 @@ public interface CategoryMapper {
List<CategoryDto> categoryList(Map<String, Object> m);
CategoryDto selectByKanCode(String kan_code);
int createProcess(CategoryDto dto);
List<CategoryDto> selectAllCategory();
}

View File

@@ -37,7 +37,9 @@ public class CategoryService {
return 1;
}
public List<CategoryDto> selectAllCategory() {
return mapper.selectAllCategory();
}
}

View File

@@ -31,9 +31,13 @@
order by kan_code desc limit #{start} , #{count}
</select>
<select id="selectByKancode" parameterType="String" resultType="CategoryDto">
<select id="selectByKanCode" parameterType="String" resultType="CategoryDto">
select * from product_category where kan_code = #{kan_code}
</select>
<select id="selectAllCategory" resultType="CategoryDto">
select * from product_category
</select>
</mapper>

View File

@@ -0,0 +1,18 @@
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>test상세페이지</title>
</head>
<body>
test success<br>
<hr>
<c:forEach items="${dto }" var="item">
${item.kan_code} : ${item.cls_nm_1} > ${item.cls_nm_2} > ${item.cls_nm_3} > ${item.cls_nm_4}<br>
활성화 : ${item.activation}<br>
<hr>
</c:forEach>
</body>
</html>