본문 바로가기

SpringFramework

개발시 참고자료 Spring Framework관련 한글문서 spring reference(한글) https://blog.outsider.ne.kr/tag/spring_reference_documentation?page=4 spring boot(한글) https://github.com/ihoneymon/translate-spring-boot-reference spring data jpa(한글) http://arahansa.github.io/docs_spring/jpa.html spring / hibernate(한글) http://dev.anyframejava.org/anyframe/doc/core/3.1.0/corefw/guide/ioc.html Spring data elastic Spring data redis Spri.. 더보기
SpringFramework Security 비밀번호 암호화하기 pom.xml org.springframework.security spring-security-core ${org.springframework-security-version} org.springframework.security spring-security-web ${org.springframework-security-version} org.springframework.security spring-security-config ${org.springframework-security-version} web.xml contextConfigLocation /WEB-INF/applicationContext.xml /WEB-INF/spring-security.xml spring-security.xml XXXContr.. 더보기
첨부파일 다운로드. xml 파일 설정(order값 추가, BeanNameViewResolver추가) 아래 다운로드 로직 추가 자바 스프링에서 파일을 다운로드 하는 예제를 올려보겠습니다. 저는 각종 문서 템플릿을 사용자들이 다운받을 수 있도록 JSP페이지에 기능을 추가 하였습니다. 파일 다운로드 로직을 유틸자바파일로 생성하고, 컨트롤러단에서 사용하였습니다. JSP 에서 url로 호출하여 사용하였습니다. 순서대로 진행하시면, 자연스럽게 이해되실꺼에요. 자바파일다운로드 코딩로직 (DownloadView.java 파일을 생성해준다.) import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; i.. 더보기
IP정보 가져오기 InetAddress local = InetAddress.getLocalHost(); String ip = local.getHostAddress(); 더보기
SpringFramework 기본설정 종합.. 프로젝트 기본 생성 후 1. 서블릿 설정 및 위치 변경 1-1. 서블릿 설정 변경(url 접속 패턴 변경 - 설정값은 원하는 대로 변경) appServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/spring/appServlet/servlet-context.xml 1 appServlet *.do 1-2. 서블릿 위치 변경(위치는 원하는 곳으로).......... contextConfigLocation classpath:/config/spring/context-*.xml .......... appServlet org.springframework.web.servlet.DispatcherServlet co.. 더보기
한글깨짐현상 톰켓에서 server.xml 더보기
ajax로 값 출력하기 pom.xml com.fasterxml.jackson.core jackson-core 2.7.3 com.fasterxml.jackson.core jackson-databind 2.7.3 Controller@RequestMapping(value="/replies/all/{bno}", method = RequestMethod.GET) public ResponseEntity list(@PathVariable("bno") int bno){ ResponseEntity entity = null; try { entity = new ResponseEntity(service.list(bno), HttpStatus.OK); } catch (Exception e) { e.printStackTrace(); entity = n.. 더보기
게시판 간단한 페이징 기능 list.jsp${totalCount - (curPage - 1) * pageCount - status.index} controller.java/* //페이징 처리하기 //한 페이지에 보여질 게시글 수 int pageCount = 10; //한 페이지에 보여질 블럭 수 int blockCount = 10; //전체 글 갯수 int totalCount = service.countArticle(); //전체 페이지 수 int totalPage = totalCount / pageCount; if(totalCount % pageCount > 0) totalPage++; //페이지의 시작번호 int startPage = (curPage - 1) * pageCount + 1; //페이지의 끝번호 int endPag.. 더보기
pom.xml설정파일 pom.xml oracle ORACLE JDBC Repository https://maven.atlassian.com/3rdparty/ com.oracle ojdbc6 12.1.0.1-atlassian-hosted javax.servlet javax.servlet-api 4.0.1 provided javax.servlet.jsp jsp-api 2.1 provided javax.servlet jstl 1.2 junit junit 4.12 test org.mybatis mybatis 3.4.6 org.mybatis mybatis-spring 1.3.2 org.springframework spring-jdbc ${org.springframework-version} org.springframework sprin.. 더보기
스프링에서 POST/GET 한글처리 1. POST에서 한글처리 web.xml encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 encodingFilter /* 2. GET에서 한글처리 server.xml 더보기