본문 바로가기

728x90

Dev/Framework

SpringBoot + JPA + QueryDSL https://docs.spring.io/spring-data/jpa/docs/2.1.3.RELEASE/reference/html/#repositories.custom-implementations Spring Data JPA - Reference Documentation Example 100. Using @Transactional at query methods @Transactional(readOnly = true) public interface UserRepository extends JpaRepository { List findByLastname(String lastname); @Modifying @Transactional @Query("delete from User u where u.active =.. 더보기
SpringBoot + JSP https://github.com/mariuszs/spring-boot-web-jsp-example mariuszs/spring-boot-web-jsp-example Contribute to mariuszs/spring-boot-web-jsp-example development by creating an account on GitHub. github.com https://stackoverflow.com/questions/21243690/is-it-possible-with-spring-boot-to-serve-up-jsps-with-a-jar-packaging Is it possible with Spring Boot to serve up JSPs with a JAR packaging? I'm familia.. 더보기
스프링 시큐리티를 이용한 로그인 처리 http://niees.tistory.com/category/spring-security 포스팅이 매우 훌륭함. 추가 http://www.waitingforcode.com/spring-security/handling-of-expired-sessions-in-spring-security/read 로그아웃 후, 재로그인이 안 되는 문제https://stackoverflow.com/questions/3145936/spring-security-j-spring-security-logout-problem/3148236#3148236https://stackoverflow.com/questions/3145936/spring-security-j-spring-security-logout-problem Concurrent .. 더보기
다국어 Message Resource 브라우져 언어 / 파라미터 처리 설정 #2 지난번 설정(하단에 다시 표기 되어 있음)으로 다국어 Resource 적용은 완벽하게 되었다고 생각했다.ㅇ ㅏ...그런데 이게 웬일인가요. 요청 언어 코드, 반환 언어 코드, 화면 표시 언어 모두 따로 놀고 있었다. EL 태그를 사용해서 다음을 출력 해 보았다. #1. 첫번째 테스트${pageContext.request.locale} = en_GB${pageContext.request.locale.language} = en${pageContext.response.locale} = en${pageContext.response.locale.language} = en화면 표시 언어 = en #2. 두번째 테스트- 파라미터로 ?langCode=ko를 넘긴 경우${pageContext.request.locale}.. 더보기
다국어 Message Resource 브라우져 언어 / 파라미터 처리 설정 #. Spring 3.0.7.RELEASE mvc-config.xml 파일 설정..... 더보기
<s:form> 태그 <form> 태그로 변환 되었을 때의 id 속성 값의 변화 고객사 사이트에 문제가 발생했다. IE8 에서 호환성 보기를 했을 때 발생하는 문제 였는데, 내가 파악한 원인은 이렇다. 문제의 페이지에서는 사용자가 글을 등록하는 활동이 이루어진다. 글을 등록하기 위해서 에디터가 사용되었고, 그 에디터와 관련된 스크립트에서는 "summary" 라는 id 속성 값으로 hidden type 의 input field 에 어떤 내용을 전달한다. 그리고 submit 이 일어 날 때, 스크립트에서는 이 hidden type 의 input field 에 내용이 있는지 없는지를 체크한다. ㅈ ㅏ. 그렇다면 처음에 내가 생각했던 문제가 발생한 원인은 에디터에서 hidden field 에 데이터를 넘겨 주지 못 했거나, 제대로 넘겨 줬는데 스크립트에서 체크할 때 읽지 못했거나. 문제가 .. 더보기
[Struts 2] Token Interceptor 안 쓰고 페이지 분기 #. Class file source public class SendEmailAction extends ActionSupport { ........ private String statusFlag = null; // 처리 결과 private String altMessage = null; // 사용자에게 보여줄 결과 메시지 @Override public String execute() throws Exception { try{ ........ }catch (Exception e) { e.printStackTrace(); setStatusFlag(ERROR); setAltMessage(getText("mail.message.error")); // xx.properties 파일에 있는 값 가져와서 넣기 retur.. 더보기
사용자에게 서버 메시지 뿌리는 방법 중 하나 #. Class file source public class SendEmailAction extends ActionSupport { ........ private String statusFlag = null; // 결과 Flag private String altMessage = null; //사용자에게 보여줄 결과 메시지 @Override public String execute() throws Exception { try{ ........ }catch (Exception e) { e.printStackTrace(); setStatusFlag(ERROR); setAltMessage(getText("mail.message.error")); return ERROR; } setStatusFlag(SUCCESS).. 더보기
[Struts2] 최초 프로젝트 구성 #. 제공되는 예제로 기본적인 틀 구성하기. #. 환경 - Java jdk : jdk1.6.0_20 - tomcat : 6.0.29 - Maven : 2.2.1 - eclipse : 3.5.2 ( Galileo ) 1. 예제 "Web Application" Download. (ㄱ) 웹브라우저에서 "http://struts.apache.org/2.2.1/index.html" 접속 > "Get Started" 라는 붉은 단추 클릭. (ㄴ) 경로 "Apache Struts 2 Documentation > Home > Tutorials > Getting Started > How To Create A Struts 2 Web Application" 로 들어가면 두 가지의 다른 Web Application 예제를 설.. 더보기