mirror of
https://github.com/suhf/No1WMS.git
synced 2026-02-04 19:54:00 +09:00
add build.gradle dependencies(gson,poi,poi-ooxml) please refresh gradle
This commit is contained in:
@@ -33,6 +33,12 @@ dependencies {
|
|||||||
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
|
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:3.0.3'
|
testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:3.0.3'
|
||||||
|
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
||||||
|
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
|
||||||
|
// https://mvnrepository.com/artifact/org.apache.poi/poi
|
||||||
|
implementation group: 'org.apache.poi', name: 'poi', version: '5.2.3'
|
||||||
|
// https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
|
||||||
|
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.2.3'
|
||||||
|
|
||||||
}
|
}
|
||||||
tasks.named('test') {
|
tasks.named('test') {
|
||||||
|
|||||||
@@ -16,6 +16,16 @@ public class CategoryController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
CategoryService categoryService;
|
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")
|
@GetMapping("/category/list")
|
||||||
public String list(@RequestParam(name="p", defaultValue = "1")int p, Model m) {
|
public String list(@RequestParam(name="p", defaultValue = "1")int p, Model m) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ public interface CategoryMapper {
|
|||||||
List<CategoryDto> categoryList(Map<String, Object> m);
|
List<CategoryDto> categoryList(Map<String, Object> m);
|
||||||
CategoryDto selectByKanCode(String kan_code);
|
CategoryDto selectByKanCode(String kan_code);
|
||||||
int createProcess(CategoryDto dto);
|
int createProcess(CategoryDto dto);
|
||||||
|
List<CategoryDto> selectAllCategory();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ public class CategoryService {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CategoryDto> selectAllCategory() {
|
||||||
|
return mapper.selectAllCategory();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,9 +31,13 @@
|
|||||||
order by kan_code desc limit #{start} , #{count}
|
order by kan_code desc limit #{start} , #{count}
|
||||||
</select>
|
</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 * from product_category where kan_code = #{kan_code}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAllCategory" resultType="CategoryDto">
|
||||||
|
select * from product_category
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
18
src/main/webapp/WEB-INF/views/category/test.jsp
Normal file
18
src/main/webapp/WEB-INF/views/category/test.jsp
Normal 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>
|
||||||
Reference in New Issue
Block a user