From 7b7db861defa2d97e52c53d1baa1141e89e224d5 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 10 Oct 2023 14:09:09 +0900 Subject: [PATCH] no message --- pom.xml | 13 +- src/main/java/cokr/xit/TsApplication.java | 4 +- .../xit/fims/base/ActionGroupController.java | 6 - .../xit/fims/base/AuthorityController.java | 6 - .../cokr/xit/fims/base/CodeController.java | 6 - .../cokr/xit/fims/base/FileController.java | 173 ------------------ .../cokr/xit/fims/base/MenuController.java | 6 - .../cokr/xit/fims/base/UserController.java | 27 --- 8 files changed, 14 insertions(+), 227 deletions(-) delete mode 100644 src/main/java/cokr/xit/fims/base/ActionGroupController.java delete mode 100644 src/main/java/cokr/xit/fims/base/AuthorityController.java delete mode 100644 src/main/java/cokr/xit/fims/base/CodeController.java delete mode 100644 src/main/java/cokr/xit/fims/base/FileController.java delete mode 100644 src/main/java/cokr/xit/fims/base/MenuController.java delete mode 100644 src/main/java/cokr/xit/fims/base/UserController.java diff --git a/pom.xml b/pom.xml index e8c1fa23..f92e740d 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ cokr.xit.boot - xit-base-starter + xit-foundation-starter 23.04.01-SNAPSHOT @@ -40,6 +40,17 @@ mariadb-java-client runtime + + + org.apache.cxf + cxf-spring-boot-starter-jaxws + 3.3.6 + + + org.hibernate + hibernate-validator + 5.3.6.Final + diff --git a/src/main/java/cokr/xit/TsApplication.java b/src/main/java/cokr/xit/TsApplication.java index 0f4f21f7..ebb29847 100644 --- a/src/main/java/cokr/xit/TsApplication.java +++ b/src/main/java/cokr/xit/TsApplication.java @@ -3,10 +3,10 @@ package cokr.xit; import org.springframework.boot.SpringApplication; import org.springframework.context.annotation.ImportResource; -import cokr.xit.base.boot.XitBaseApplication; +import cokr.xit.foundation.boot.FoundationApplication; @ImportResource("classpath:spring/context-*.xml") -public class TsApplication extends XitBaseApplication { +public class TsApplication extends FoundationApplication { public static void main(String[] args) { SpringApplication.run(TsApplication.class, args); diff --git a/src/main/java/cokr/xit/fims/base/ActionGroupController.java b/src/main/java/cokr/xit/fims/base/ActionGroupController.java deleted file mode 100644 index b369fde3..00000000 --- a/src/main/java/cokr/xit/fims/base/ActionGroupController.java +++ /dev/null @@ -1,6 +0,0 @@ -package cokr.xit.fims.base; - -import org.springframework.stereotype.Controller; - -@Controller -public class ActionGroupController extends cokr.xit.base.security.access.web.ActionGroupController {} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/base/AuthorityController.java b/src/main/java/cokr/xit/fims/base/AuthorityController.java deleted file mode 100644 index 93f1b5ff..00000000 --- a/src/main/java/cokr/xit/fims/base/AuthorityController.java +++ /dev/null @@ -1,6 +0,0 @@ -package cokr.xit.fims.base; - -import org.springframework.stereotype.Controller; - -@Controller -public class AuthorityController extends cokr.xit.base.security.access.web.AuthorityController {} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/base/CodeController.java b/src/main/java/cokr/xit/fims/base/CodeController.java deleted file mode 100644 index d55da1ae..00000000 --- a/src/main/java/cokr/xit/fims/base/CodeController.java +++ /dev/null @@ -1,6 +0,0 @@ -package cokr.xit.fims.base; - -import org.springframework.stereotype.Controller; - -@Controller -public class CodeController extends cokr.xit.base.code.web.CodeController {} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/base/FileController.java b/src/main/java/cokr/xit/fims/base/FileController.java deleted file mode 100644 index 5531a2c3..00000000 --- a/src/main/java/cokr/xit/fims/base/FileController.java +++ /dev/null @@ -1,173 +0,0 @@ -package cokr.xit.fims.base; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.StringWriter; -import java.net.URISyntaxException; -import java.net.URLDecoder; -import java.util.regex.Matcher; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpHeaders; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.servlet.ModelAndView; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import cokr.xit.base.file.dao.FileMapper; -import cokr.xit.base.file.service.FileQuery; -import cokr.xit.base.file.service.bean.FileBean; - -@Controller -public class FileController extends cokr.xit.base.file.web.FileController { - @Resource(name = "fileMapper") - private FileMapper fileMapper; - - @Resource(name="fileBean") - private FileBean fileBean; - - @Override - public ModelAndView getFileList(FileQuery req) { - return setCollectionInfo( - new ModelAndView("jsonView"), - fileService().getFileList(req), - "file" - ); - } - - /** 메뉴얼을 다운로드한다. - * @return 메뉴얼 파일 - * @throws Exception - */ - @GetMapping(name = "메뉴얼 다운로드", value = "/downloadMenual.do") - public ModelAndView downloadMenual() throws Exception { - ModelAndView mav = new ModelAndView("downloadView"); - - String filePath = ("menual/메뉴얼.pptx"); - ClassPathResource cps = new ClassPathResource(filePath); - InputStream menualIS = cps.getInputStream(); - - mav.addObject("file", menualIS); - mav.addObject("filename", "메뉴얼.pptx"); - mav.addObject("contentType", "application/vnd.openxmlformats-officedocument.presentationml.presentation"); - mav.addObject("length", menualIS.available()); - - return mav; - } - - - @GetMapping(name = "SVG 이미지 파일 색상 변경", value = "/modifySvg/**") - public void modifySvg(HttpServletRequest request, HttpServletResponse response) throws URISyntaxException, IOException, ParserConfigurationException, SAXException { - String requestURI = request.getRequestURI().toString(); - - String filepath = requestURI.split("modifySvg")[1]; - filepath = URLDecoder.decode(filepath, "UTF-8"); - filepath = filepath.replaceAll("/", Matcher.quoteReplacement(File.separator)); - filepath = "svg" + filepath; - - ClassPathResource resource = new ClassPathResource(filepath); - InputStream is = resource.getInputStream(); - - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder documentBuilder = factory.newDocumentBuilder(); - Document document = documentBuilder.parse(is); - Element root = document.getDocumentElement(); - NodeList nodeList = root.getChildNodes(); - - try { - String modify = request.getParameter("modify"); - if(modify == null || modify.equals("")){ - - } else if(modify.equals("active")){ - updateTagFillColor(nodeList, "green"); - } else if(modify.equals("alert")){ - updateTagFillColor(nodeList, "red"); - } - - String str4 = DocumentToString(document); - byte[] bytes = str4.getBytes(); - - response.setHeader(HttpHeaders.ACCEPT_RANGES, "bytes"); - response.setHeader(HttpHeaders.CONTENT_TYPE, "image/svg+xml"); - response.setHeader(HttpHeaders.CONNECTION, "keep-alive"); - response.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"); - response.setHeader("Pragma", "no-cache"); - response.setHeader(HttpHeaders.CACHE_CONTROL, "no-cache, must-revalidate"); - response.setDateHeader(HttpHeaders.EXPIRES, 0); - response.setHeader(HttpHeaders.CONTENT_LENGTH, Integer.toString(bytes.length)); - response.setContentType("image/svg+xml"); - - OutputStream os = response.getOutputStream(); - os.write(bytes); - os.flush(); - os.close(); - - - } catch (Exception e){ - - } - - - } - - - - public static String DocumentToString( Document doc ) - { - try - { - StringWriter clsOutput = new StringWriter( ); - Transformer clsTrans = TransformerFactory.newInstance( ).newTransformer( ); - - clsTrans.setOutputProperty( OutputKeys.OMIT_XML_DECLARATION, "no" ); - clsTrans.setOutputProperty( OutputKeys.METHOD, "xml" ); - clsTrans.setOutputProperty( OutputKeys.INDENT, "yes" ); - clsTrans.setOutputProperty( OutputKeys.ENCODING, "UTF-8" ); - - clsTrans.transform( new DOMSource( doc ), new StreamResult( clsOutput ) ); - - return clsOutput.toString( ); - } - catch( Exception ex ) - { - return ""; - } - } - - private void updateTagFillColor(NodeList nodeList, String newFillColor) { - - for (int i = 0; i < nodeList.getLength(); i++) { - Node node = nodeList.item(i); - NamedNodeMap namedNodeMap = node.getAttributes(); - if(namedNodeMap != null && namedNodeMap.getLength() > 0){ - for (int j = 0; j < namedNodeMap.getLength(); j++) { - Node namedNode = namedNodeMap.item(j); - if (namedNode.getNodeName().equalsIgnoreCase("fill")) { - namedNode.setNodeValue(newFillColor); // Change the color of the fill attribute. - } - } - } - } - } - - -} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/base/MenuController.java b/src/main/java/cokr/xit/fims/base/MenuController.java deleted file mode 100644 index b058d11e..00000000 --- a/src/main/java/cokr/xit/fims/base/MenuController.java +++ /dev/null @@ -1,6 +0,0 @@ -package cokr.xit.fims.base; - -import org.springframework.stereotype.Controller; - -@Controller -public class MenuController extends cokr.xit.base.menu.web.MenuController {} \ No newline at end of file diff --git a/src/main/java/cokr/xit/fims/base/UserController.java b/src/main/java/cokr/xit/fims/base/UserController.java deleted file mode 100644 index badab9b2..00000000 --- a/src/main/java/cokr/xit/fims/base/UserController.java +++ /dev/null @@ -1,27 +0,0 @@ -package cokr.xit.fims.base; - -import org.springframework.stereotype.Controller; -import org.springframework.web.servlet.ModelAndView; - -import cokr.xit.base.user.ManagedUser; - -@Controller -public class UserController extends cokr.xit.base.user.web.UserController { - - - - @Override - public ModelAndView main() { - ModelAndView mav = super.main(); - return mav; - } - - @Override - public ModelAndView getInfo(String userID) { - ModelAndView mav = super.getInfo(userID); - - - return mav; - } - -} \ No newline at end of file