diff --git a/build.gradle b/build.gradle index 9890e9f..14d2d37 100644 --- a/build.gradle +++ b/build.gradle @@ -1,16 +1,11 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.2.1' + id 'org.springframework.boot' version '2.5.0' id 'io.spring.dependency-management' version '1.1.4' } group = 'com.no1' version = '0.0.1-SNAPSHOT' - -java { - sourceCompatibility = '17' -} - configurations { compileOnly { extendsFrom annotationProcessor @@ -24,7 +19,7 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3' + implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.3.0' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' @@ -32,14 +27,27 @@ dependencies { implementation group: 'org.glassfish.web', name: 'jakarta.servlet.jsp.jstl', version: '2.0.0' implementation 'org.apache.tomcat.embed:tomcat-embed-jasper' 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:2.3.0' // 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' - + implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.2.3' + + // https://mvnrepository.com/artifact/org.apache.tiles/tiles-jsp + implementation group: 'org.apache.tiles', name: 'tiles-jsp', version: '3.0.8' + + // https://mvnrepository.com/artifact/org.apache.tiles/tiles-servlet + implementation group: 'org.apache.tiles', name: 'tiles-servlet', version: '3.0.8' + + // https://mvnrepository.com/artifact/org.apache.tiles/tiles-el + implementation group: 'org.apache.tiles', name: 'tiles-el', version: '3.0.8' + + implementation 'org.apache.tiles:tiles-api:3.0.8' + implementation 'org.apache.tiles:tiles-core:3.0.8' + + } tasks.named('test') { useJUnitPlatform() diff --git a/src/main/java/com/no1/wms/authority/AuthorityController.java b/src/main/java/com/no1/wms/authority/AuthorityController.java index 9bd1704..9c778a8 100644 --- a/src/main/java/com/no1/wms/authority/AuthorityController.java +++ b/src/main/java/com/no1/wms/authority/AuthorityController.java @@ -5,21 +5,28 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.servlet.ModelAndView; -import java.util.UUID; - @Controller public class AuthorityController { @Autowired AuthorityService authorityService; - @GetMapping("/test") + @GetMapping("/test/tt") public ModelAndView test(ModelAndView mav){ - AuthorityDto dto = authorityService.selectById("94690a18-a933-11ee-b9dd-0242ac110006"); + //AuthorityDto dto = authorityService.selectById("94690a18-a933-11ee-b9dd-0242ac110006"); - System.out.println(dto.getName()); + //System.out.println(dto.getName()); - mav.setViewName("test/kkk"); + mav.setViewName("test/testlayout"); + return mav; + } + @GetMapping("/tt") + public ModelAndView test2(ModelAndView mav){ + //AuthorityDto dto = authorityService.selectById("94690a18-a933-11ee-b9dd-0242ac110006"); + + //System.out.println(dto.getName()); + + mav.setViewName("test/testlayout"); return mav; } diff --git a/src/main/java/com/no1/wms/base/WebConfig.java b/src/main/java/com/no1/wms/base/WebConfig.java new file mode 100644 index 0000000..11dddd1 --- /dev/null +++ b/src/main/java/com/no1/wms/base/WebConfig.java @@ -0,0 +1,33 @@ +package com.no1.wms.base; + + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.view.tiles3.TilesConfigurer; +import org.springframework.web.servlet.view.tiles3.TilesView; +import org.springframework.web.servlet.view.tiles3.TilesViewResolver; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Bean + public TilesConfigurer tilesConfigurer(){ + final TilesConfigurer configurer = new TilesConfigurer(); + + configurer.setDefinitions(new String[]{ + "/WEB-INF/tiles/tiles.xml" + }); + + configurer.setCheckRefresh(true); + return configurer; + } + + @Bean + public TilesViewResolver tilesViewResolver() { + final TilesViewResolver tilesViewResolver = new TilesViewResolver(); + tilesViewResolver.setViewClass(TilesView.class); + tilesViewResolver.setOrder(1); + return tilesViewResolver; + } +} diff --git a/src/main/java/com/no1/wms/category/CategoryController.java b/src/main/java/com/no1/wms/category/CategoryController.java index 287efa9..b7fbb8e 100644 --- a/src/main/java/com/no1/wms/category/CategoryController.java +++ b/src/main/java/com/no1/wms/category/CategoryController.java @@ -15,7 +15,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import com.no1.wms.excel.ExcelUtils; -import jakarta.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServletResponse; + @Controller public class CategoryController { @@ -26,7 +27,7 @@ public class CategoryController { @Autowired ExcelUtils excelUtils; - // 테스트 + //테스트 @GetMapping("/category/test") public String testPage(Model m) { List dto = categoryService.selectAllCategory(); diff --git a/src/main/java/com/no1/wms/excel/ExcelUtils.java b/src/main/java/com/no1/wms/excel/ExcelUtils.java index b39ba4b..691d14b 100644 --- a/src/main/java/com/no1/wms/excel/ExcelUtils.java +++ b/src/main/java/com/no1/wms/excel/ExcelUtils.java @@ -13,12 +13,12 @@ import org.springframework.stereotype.Service; import com.no1.wms.category.CategoryDto; -import jakarta.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpServletResponse; @Service public class ExcelUtils { - public void downloadCategoryExcelFile(String excelFileName, HttpServletResponse response, + public void downloadCategoryExcelFile(String excelFileName, HttpServletResponse response, String sheetName, String[] columnName, List dto) { String fileName = ""; try { diff --git a/src/main/resources/static/css/base.css b/src/main/resources/static/css/base.css new file mode 100644 index 0000000..e01d63e --- /dev/null +++ b/src/main/resources/static/css/base.css @@ -0,0 +1,21 @@ +.navi-bg { + background-color : antiquewhite; +} +.img-user{ + width : 100%; +} +.active{ + font-weight : bolder; +} +.user-name{ + font-size : 1.2rem; +} +.body-bg{ + background-color : darkseagreen; +} +.form-select{ + width:auto; +} +#search_modal_content{ + height : 80vh; +} \ No newline at end of file diff --git a/src/main/resources/static/dev/base.css b/src/main/resources/static/dev/base.css new file mode 100644 index 0000000..e01d63e --- /dev/null +++ b/src/main/resources/static/dev/base.css @@ -0,0 +1,21 @@ +.navi-bg { + background-color : antiquewhite; +} +.img-user{ + width : 100%; +} +.active{ + font-weight : bolder; +} +.user-name{ + font-size : 1.2rem; +} +.body-bg{ + background-color : darkseagreen; +} +.form-select{ + width:auto; +} +#search_modal_content{ + height : 80vh; +} \ No newline at end of file diff --git a/src/main/resources/static/dev/base.js b/src/main/resources/static/dev/base.js new file mode 100644 index 0000000..5b464c7 --- /dev/null +++ b/src/main/resources/static/dev/base.js @@ -0,0 +1,17 @@ + +//변수 +let yesNoModal; +let searchModal; + +//변수 끝 + + +//네비게이션 누를때 실행될 액션 +function clickMenu(menu){ + $("a.active").removeClass("active"); + + const $menu = $(menu); + + $menu.addClass("active"); +} + diff --git a/src/main/resources/static/dev/layout_dev.html b/src/main/resources/static/dev/layout_dev.html new file mode 100644 index 0000000..1beeedf --- /dev/null +++ b/src/main/resources/static/dev/layout_dev.html @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + No1 WMS + + + +
+
+ + + + + + +
+
+
+
+ + + + + + + + + + + + +
Header 1Header 2Header 3Header 4Header 5
Row:1 Cell:1Row:1 Cell:2Row:1 Cell:3Row:1 Cell:4Row:1 Cell:5
Row:2 Cell:1Row:2 Cell:2Row:2 Cell:3Row:2 Cell:4Row:2 Cell:5
Row:3 Cell:1Row:3 Cell:2Row:3 Cell:3Row:3 Cell:4Row:3 Cell:5
Row:4 Cell:1Row:4 Cell:2Row:4 Cell:3Row:4 Cell:4Row:4 Cell:5
Row:5 Cell:1Row:5 Cell:2Row:5 Cell:3Row:5 Cell:4Row:5 Cell:5
Row:6 Cell:1Row:6 Cell:2Row:6 Cell:3Row:6 Cell:4Row:6 Cell:5
+
+
+
+
+ + + + + + + + + +
+
+
+
+
+
+ +
+ 설명란 있는 입력 + +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ + + +
+
+ + + +
+
+ + +

+ + +
+
+
+
+
+ + +
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/dev/layout_dev_base.html b/src/main/resources/static/dev/layout_dev_base.html new file mode 100644 index 0000000..b7120a2 --- /dev/null +++ b/src/main/resources/static/dev/layout_dev_base.html @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + No1 WMS + + + +
+
+ + + + + + + + +
+
+
+
+ + + 여기다가 화면 만들기 + +
+
+
+
+ + +
+ + + +
+ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/js/base.js b/src/main/resources/static/js/base.js new file mode 100644 index 0000000..5b464c7 --- /dev/null +++ b/src/main/resources/static/js/base.js @@ -0,0 +1,17 @@ + +//변수 +let yesNoModal; +let searchModal; + +//변수 끝 + + +//네비게이션 누를때 실행될 액션 +function clickMenu(menu){ + $("a.active").removeClass("active"); + + const $menu = $(menu); + + $menu.addClass("active"); +} + diff --git a/src/main/webapp/WEB-INF/tiles/tiles.xml b/src/main/webapp/WEB-INF/tiles/tiles.xml new file mode 100644 index 0000000..ca51d9a --- /dev/null +++ b/src/main/webapp/WEB-INF/tiles/tiles.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/base/layout.jsp b/src/main/webapp/WEB-INF/views/base/layout.jsp new file mode 100644 index 0000000..4cbefcd --- /dev/null +++ b/src/main/webapp/WEB-INF/views/base/layout.jsp @@ -0,0 +1,140 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%> + + + + + + + + + + + + + + No1 WMS + + + +
+
+ + + + + +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/views/base/navigation.jsp b/src/main/webapp/WEB-INF/views/base/navigation.jsp new file mode 100644 index 0000000..b137332 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/base/navigation.jsp @@ -0,0 +1,91 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + \ No newline at end of file