기본 콘텐츠로 건너뛰기

9월, 2017의 게시물 표시

MySQL에서의-대소문자-처리

http://deadfile.tistory.com/entry/MySQL%EC%97%90%EC%84%9C%EC%9D%98-%EB%8C%80%EC%86%8C%EB%AC%B8%EC%9E%90-%EC%B2%98%EB%A6%AC 테이블 쿼리를 할 경우는 대소문자를 구분 필드 값을 비교 할때는 대소문자를 구분하지 않음. select * from test where test = BINARY('test'); 이렇게 하거나 필드 자체를 대소문자를 구분하게 생성해야함... 내가 알던 DBMS랑 많이 다른듯

다운로드 파일명 깨짐현상 처리

웹개발시 파일 다운로드 할때 한글 특수 문자 깨짐.. 이것이 설명이 잘되 있는데 공백 처리는 되는데 !@#$%^&*() 이거 처리도 되는지 잘모르겠다 http://devdic.tistory.com/26 public static String getBrowser(HttpServletRequest request) { String userAgent = request.getuserAgent("User-Agent"); if (userAgent.indexOf("MSIE") > -1 || userAgent.indexOf("Trident") > -1 ){ //IE 버전 별 체크 >> Trident/7.0(IE 11), Trident/6.0(IE 10) , Trident/5.0(IE 9) , Trident/4.0(IE 8) return "MSIE"; } else if (userAgent.indexOf("Chrome") > -1) { return "Chrome"; } else if (userAgent.indexOf("Opera") > -1) { return "Opera"; } else if ( userAgent.indexOf("Firefox") > -1 ) { return "Firefox"; } return "Safari"; }

SpringSecurity 강제로 로그인 시키기

http://www.coolio.so/springsecurity-%EA%B0%95%EC%A0%9C%EB%A1%9C-%EB%A1%9C%EA%B7%B8%EC%9D%B8-%EC%8B%9C%ED%82%A4%EA%B8%B0/ 정의되지 않은 로그인 폼을 통해서 로그인 할 경우에도 강제로 SpringSecurity의 로그인 세션을 생성하는 방법을 구현하였다. 1. 로그인으로 사용한 URL에 대한 세션체크 기능을 제외한다. 1 2. 컨트롤러에서 SpringSecurity에 세션 주입 @Resource(name="userDetailsService") protected UserDetailsService userDetailsService; @RequestMapping(value="login", method=RequestMethod.POST) public String login(HttpServletRequest request) throws Exception{     UserDetails ckUserDetails = userDetailsService.loadUserByUsername("USER_ID");     Authentication authentication = new UsernamePasswordAuthenticationToken(ckUserDetails, "USER_PASSWORD", ckUserDetails.getAuthorities());     SecurityContext securityContext = SecurityContextHolder.getContext();     securityContext.setAuthentication(authentication);     HttpSession session = request.getSession(true);     session.setAttribute("SPRING_SECURITY_CONTEXT&quo

javascript 반복 실행 setTimeout , setInterval

어떤일을 하고 1초후 실행 setTimeout(function () {     something(); }, 1000); // Execute something() 1 second later. setInterval(): 일이 끝나지 않아도  2초 마다 실행 It is a function that execute a JavaScript statement EVERY x interval. setInterval(function () {     somethingElse(); }, 2000); // Execute somethingElse() every 2 seconds.

리눅스 시간 맞추기...

이걸 몰라서 계속 안된다구 했네.. ㅠ.ㅠ 먼저 서버 시간 설정을 Seoul로 변경 ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime 자동으로 시간 설정 rdate -s time.bora.net 수동으로 시간 설정 date -s "2017-09-09 07:57:50"