목록Web /Spring Framework tip (16)
알쓸전컴(알아두면 쓸모있는 전자 컴퓨터)
spring -> tomcat 원격 배포 deploy 기본 참조 사이트는 : https://www.baeldung.com/tomcat-deploy-war pom.xml org.springframework.boot spring-boot-maven-plugin org.codehaus.cargo cargo-maven2-plugin tomcat8x remote runtime admin admin http://localhost:8080/manager/text 에 추가 하고 톰켓 에서는 tomcat-users.xml 파일을 수정해 줍니다. 그리고 나서 배포 해준다. 위애 방법으로 안되어서 추가 적인 방법을 정리 합니다, org.apache.maven.pluginsmaven-war-plugin2.4src/main/w..
spring oracle db 연결 spring 프레임 워크에서 oracle db 접속 방법입니다. 먼저 라이브러리 설정을 해야 합니다. 1.6 3.1.1.RELEASE 1.6.10 1.6.6 utf-8 utf-8 codelds https://code.lds.org/nexus/content/groups/main-repo org.springframework spring-context ${org.springframework-version} com.oracle ojdbc6 11.2.0.3 그리고 나서 mybatis 는 org.mybatis mybatis 3.4.1 org.mybatis mybatis-spring 1.3.0 다음과 같이 추가 해줍니다 . 그다음 src>>webapp>>WEB-INF>>spring..
spring 3.0 자동 bean 생성 spring 3.0 부터 을 생성 하지 않아도 @autowire 와 @inject 가 문제 없이 사용 되어서 원인을 찾아 보았다. 스프링 3.0세대부터는직접 빈으로 등록해야할 클래스 파일에 @Service , @Repository 에노테이션을 통해서/WEB-INF/spring/servlet-context.xml의 이 자동으로 주어서 root-context.xml 다시 빈을 주입안해도 된다. 이걸 모르고 주입을 했다면 중복 빈 생성에 따른 인식 오류 메시지가 뜹니다.
XML에서는 < 부등호를 TAG로 인식하기 때문에 "The content of elements must consist of well-formed character data or markup."라는 에러가 발생하게 된다. 이와 같은 문제를 해결하기 위해서는 Query안에 사용되고 있는 부등호가 문자열이라것을 의미하게 "으로 감싸준다.
axios(post) -> spring framework json 객체 변환 Controller 에 추가시 @RequestMapping(value = "/suggestion_peer_insert", method = RequestMethod.POST) public void suggestion_peer_insert(@RequestBody String filterJSON,HttpServletRequest request, HttpServletResponse response) { try { suggestion_dao.suggestion_peer_insert(filterJSON,request, response); }catch(Exception e1) { // TODO Auto-generated catch block..
vue-simple-uploader (Server 파트) simple-uploader 을 사용 하기 위해서는 먼저 POST 로 전송온 request 객체를 multipartHttpServletRequest 으로 변환 해줘야 합니다. multipartHttpServletRequest 을 사용 하기 위해서는 1.pom.xml commons-io commons-io 2.0.1 commons-fileupload commons-fileupload 1.2.2 추가해 줍니다. 2.wepapp->WEB-INF->spring->appServlet->servlet-context.xml bean을 추가해 줍니다. 여기서 옵션으로는 maxUploadSize(최대업로드 가능한 바이트크기)maxInMemorySize(디스크에 임..