pooney
article thumbnail
Spring 외부 설정 프로퍼티
Spring 2020. 4. 6. 03:21

흔히 git 을 사용할때 올리고 싶지 않은 파일의 경우 ignore를 사용하여 올리지 않는다 이경우 db의 내용이라던가 중요 내용은 올리면 안되는데 이것을 해결할때 프로퍼티를 사용하면 db프로퍼티 파일은 올리지않고 값을 넣어서 사용가능하다 . 1. 프로퍼티 파일을 만든다 2. 프로퍼티 파일의 내용 3. PropertyPlaceholderConfigurer 클래스를 빈으로 등록하여 사용 하거나 태그를 사용하여 프로퍼티 설정값을 사용한다 3-1) 태그를 사용하는 경우 xml에 추가 하고 이때 두개의 프로퍼티 파일을 사용할경우 콤마를 사용하여 분리하여 사용한다 , 를 여러개 사용하는 경우 첫번째만 인식이 되어 에러가 발생한다 3-2) PropertyPlaceholderConfigurer 클래스를 빈으로 등록하..

article thumbnail
git 되돌아가기
GIT 2020. 4. 6. 03:04

처음 git을 잘못사용하여 파일이 전부 삭제가 되었다 이것을 되돌리기 위하여 git log를 통해 log를 확인하고 git reflog 를 통해 값을 확인하여 git reset으로 되돌아갔다.

Spring 트랜잭션
Spring 2020. 2. 22. 02:35

트랜잭션 처리 시 어노테이션을 사용하여 쉽게 롤백처리가 가능한데 이때 롤백에 이루어지지 않는 경우가 발생 할 수 있다 이때 root-context.xml 에 아래와 같은 코드를 삽입하고 끝을 내는 경우가 있는데 servlet-context.xml에 부분을 삽입해야 롤백을 할 수 있다. root-context.xml servlet.xml http://bbans.blogspot.com/2014/06/transactional-spring.html @Transactional spring 롤백 트랜잭션 트랜잭션 처리 부분을 만들려고 오전부터 머리를 좀 쎄게 굴려봤다. 알고나면 별 것 아닌 것들이... 할 때는 왜이렇게 사람을 힘들게 하는가...ㅎㅎ 여튼 예전에도 스프링에서 트랜잭션 처리를 해본적은 있었으나... ..

Spring 파일업로드
Spring 2020. 2. 20. 16:34

파일 업로드 시 두가지 방법이 존재한다 1. form태그를 이용한 방법 업로드 2. ajax를 이용한 방법 (formData를 이용하여 파일을 전송하는방법 formData는 가상의 form이라고 생각) var data = event.originalEvent.dataTransfer.files; var formData = new FormData(); formData.append("profileImg",data[0]); $.ajax({ url:"${path}/upload/insertProfileImg", processData : false, contentType : false, type:"POST", data:formData, dataType:"text", success:function(result){ con..

HttpMediaTypeNotSupportedException
Spring 2020. 1. 15. 23:03

ajax를 사용시 type을 post를 이용할 때 controller에서 @requestbody를 사용해서 받을 때 아래와 같은 에러가 발생한다. application / x-www-form-urlencoded를 사용할 때 Spring이 그것을 RequestBody로 이해하지 못한다는 것이다다. 따라서 이것을 사용하려면 @RequestBody 주석을 제거해야합니다 . HttpMediaTypeNotSupportedException: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported 클라이언트 $.ajax({ url: "/scheduler/user/usercheck", type: "post", data: usercheck..

Spring 버전 업 시 에러
Spring 2020. 1. 13. 19:06

자바 1.6 -> 1.8 , Spring 4.1.3 -> 5.1.3 로 업글 시 아래와 같은 에러 발생 1.6 4.1.3.RELEASE 1.6.10 1.6.6 1.8 5.1.3.RELEASE 1.6.10 1.6.6 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: F..

article thumbnail
mysql 명령어
SQL 2020. 1. 13. 03:17

mysql 비교문 select if('컬럼값' = '비교값','참일때 ','거짓일 때') result from user ex) select IF( id = 'hoo3' , 'true' , 'false' ) result from user ex) select IF( id => 'hoo3' , 'true' , 'false' ) result from user

html 달력
HTML 2020. 1. 7. 14:20

★Jerry의 달력★ 일 월 화 수 목 금 토 참고 : https://jerryjerryjerry.tistory.com/26