본문 바로가기

STUDY/SPRING9

SpringBootSecurity Rest Login 적용 이번에 SpringBootSecurity를 적용해보았다. pom.xml에 SpringBootSecurity Dependency 추가 org.springframework.boot spring-boot-starter-securityColored by Color Scriptercs SecurityConfig 생성. package kr.co.test.config; import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframewo.. 2018. 8. 24.
Executorexception: No constructor found in XXX Spring 프로젝트를 만드는데 Executorexception: No constructor found in XXX ERROR가 떠 문제를 살펴보다가 코드 상에서는 특이사항이 없어 인터넷을 찾다보니 MyBatis가 자동적으로 객체를 생성할 때는 기본적으로 파라미터 없는 생성자가 존재해야한다. 즉 파라미터가 없는 생성자를 가지고 있지 않아서 객체를 MyBatis가 생성하려고 할 때 뱉는 에러라고 한다. 결론. 디폴트 생성자를 만들어주면 ERROR가 나지 않는다. 2018. 7. 25.
SPRING SWAGGER 정의 저번에 Spring Swagger 관련하여 정리를 했었는데,다시 한번 더! Swagger?Rest 기반의 API의 매핑된 URL을 자동으로 문서 및 테스트 환경을 만들어주는 오픈소스이다.Swagger을 도입함으로서 클라이언트와 개발자가 파라미터들의 호출에 맞게 호출 및 테스트를 진행 할 수 있다. SpringBoot에 설치pom.xml 추가 io.springfox springfox-swagger-ui 2.4.0 compile io.springfox springfox-swagger2 2.4.0 compileColored by Color ScriptercsSwagger Config 설정 @Configuration@EnableSwagger2public class SwaggerConfig { /** * Swag.. 2018. 7. 24.
@Valid Spring @Valid에 대해 알아보자. @Valid는 객체의 데이터의 유효성 체크 및 데이터 검증을 위한 어노테이션이다. pom.xml에 dependency를 추가해준다. javax.validation validation-api 2.0.1.Final org.hibernate.validator hibernate-validator 6.0.8.Final Colored by Color Scriptercs dependency를 추가했으니 활용해보자. @Data@AllArgsConstructorpublic class Sample{ private String id; private String name; private String email; private String passwd; private String ph.. 2018. 7. 23.