본문 바로가기 메뉴 바로가기

Practical Accumulation

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Practical Accumulation

검색하기 폼
  • 분류 전체보기 (423)
    • 광고 (0)
    • 업무 폴더 (0)
    • Demos (40)
      • 민원신청 SPA (0)
      • Email Client (14)
      • Shopping mall (9)
      • Football Club (12)
    • Languages (25)
    • Spring (185)
      • Hibernate (27)
      • Spring Basic (45)
      • Spring Security (15)
      • Spring AOP (12)
      • Spring REST (23)
      • Spring Advanced (18)
      • Spring Boot (26)
      • Spring Test (16)
      • Microservice (3)
    • Client Technologies (61)
      • Angular (30)
      • React (19)
      • Bootstrap (9)
      • Thymeleaf (3)
    • Side Technologies (46)
    • Basic (13)
      • Algorithms (10)
      • Data Structure (2)
    • Embedded Systems (2)
    • IT 관련 유용한 것들 (4)
    • 기록 (43)
  • 방명록

스프링 (8)
Spring Advanced : Spring Boot + Security login custom 메소드로 구현하기

1. 이 포스트는 Spirng Security를 사용하지만, Security filters 로그인을 맡기는 것이 아닌 직접 코딩하는 내용이다. 1-1 보통 WebSecurity Config 클래스의 AuthenticationMangerBuilder를 통하여 접근방법을 등록한다. 1-1-1 UserDetailsService를 구현하여 이 객체를 AuthenticationProvider에 제공하고 1-1-2 이것을 AuthenticationManager가 사용한다. 2. 작업 순서는 2-0 의존성 추가 2-1 데이터베이스 생성 및 연결 2-2 User, Role Entity 생성 및 연결 2-3 UserRepository, RoleRepository 생성 2-4 서비스 코드 생성 2-4-1 UserDetai..

Spring/Spring Advanced 2020. 6. 9. 00:59
Spring : Data JPA - 상속 Entity의 Lombok

1. lombok은 귀찮은 setter, getter, contructor, toString, equals 등의 많은 메소드들을 자동으로 구현해 준다. 2. Entity 클래스를 생성할 때 모든 Entity가 id를 사용하는데 같은 속성이름(보통 id)일 때는 반복하는 것이 번거롭다. 2-1 이를 해결하기 위해서 중복이 부분을 별도의 클래스에 지정하고 그 클래스를 상속한다. 2-2 중요한 것은 상속을 받는 부모 클래스에도 @Data annotation을 지정하여 setter, getter를 생성해야 한다. 2-3 당연한 말이지만, 빼먹고 원인을 못찾을 경우가 많다. 2-4 @MappedSuperclass가 핵심인데 컴파일되면 자식클래스가 부모를 그대로 복사하는 것처럼 된다. import javax.per..

Spring/Spring Basic 2020. 4. 29. 15:27
Spring Boot : Email 보내기

0. 순서 0-1. spring-boot-starter-mail을 pom.xml에 추가 0-2. 스프링이 제공하는 MailSender를 사용하는 서비스 작성하기 (예를 들면 EmailUtil) 0-3. application.properties에 사용할 메일 서버 정보 설정 0-4. 필요시 EmailUtil을 주입받아 사용 1. 이 포스트는 Email 전송을 위한 기능을 가지는 컴포넌트를 작성하여 사용하는 방법을 설명한다. 2. email을 전송을 지원하는 스프링 모듈을 import한다. org.springframework.boot spring-boot-starter-mail 3. 스프링의 mail starter는 MailSender interface와 MailSenderImpl을 제공한다. 3-1. 실제..

Spring/Spring Boot 2020. 4. 26. 06:13
Spring : Web MVC + Form Validation - Basic and @InitBinder

-1. Form Validation은 시스템에서 원하는 값이 입력되도록 제한하고 검증하는 기능을 가진다. -1-1 서버단에서 처리하기 때문에 시스템에 부하를 가지고 올 수 밖에 없다. 0. Bean Validation은 단순한 specification이다. 1. Hibernate Validator는 하나의 Bean Validation을 구현하는 프로젝트이다. 1-1 Hibernate ORM과는 별도의 프로젝트를 구성하고 별도의 버전을 가진다. 1-2 maven에서 Hibernate Validator 의존성을 추가해야 한다. org.hibernate hibernate-validator 6.1.4.Final 2. 구현을 위해서 validation을 사용할 객체(Entity나 DTO)에 원하는 검증기능을 추가..

Spring/Spring Basic 2020. 4. 23. 22:17
Spring : Web MVC - Request parameter 받기

1. 가장 기본적으로 Controller에서 request parameter를 받는 방법은 HttpServletRequest를 사용하는 것이다. @Controller public class HelloWorldContoller { @GetMapping("/showForm") public String showForm() { return "helloworld-form"; } @GetMapping("/processForm") public String processForm(HttpServletRequest request, Model model) { String name = request.getParameter("studentName"); model.addAttribute("name", name.toUpperCas..

Spring/Spring Basic 2020. 4. 22. 22:50
Spring : Web MVC with XML configuration

0. 스프링 Web MVC를 사용하기 위해서 필요한 모듈이 있다. 0-1 spring-core, spring-context (스프링을 사용하기 위한 기본적인 모듈이다.) 0-2 spring-web-mvc (사실 core, context를 모두 포함하고 있다.) 0-3 servlet, jsp, jstl 0-3-1 jstl 모듈은 jstl-api나 jsp-api 모듈이 아니다. jstl 모듈은 jstl-api + tag lib를 포함한다. javax.servlet jstl 1.2 javax.servlet.jsp javax.servlet.jsp-api 2.3.3 provided javax.servlet javax.servlet-api 4.0.1 provided 0-4 만약 프로젝트 생성을 maven arche..

Spring/Spring Basic 2020. 4. 22. 20:35
Spring : Configuration with XML configuration + Spring Annotations + @Qualifier

1. 스프링에서 XML설정과 함께 annotation을 사용하면 xml 설정을 줄일 수 있다. 1-1. 스프링에서 annotation을 사용하려면 xml에 component scanning 설정이 필요하다. 1-2. 아래처럼 최상위 package 경로를 설정하여 어디를 scan해야 하는지 지정해야 한다. 2. @Component를 스프링이 관리할 클래스에 추가하면 xml의 설정을 할 필요가 없다. 2-1 @Component("") 방식도 사용가능한데 "" 내에 컨테이너가 관리할 이름을 넣어주면 된다. 2-2 지정 이름을 사용하면 실제 사용시에도 정확한 이름으로 getBean을 호출해야 한다. 2-3 @Component를 지정할 때 Scope도 같이 지정할 수 있다. 2-3-1 @Component과 별개로..

Spring/Spring Basic 2020. 4. 22. 17:23
Spring : Bean Scope and Bean Lifecycle

Scope - 스프링 컨테이너에서 어떻게 스프링빈이 관리되는지에 관한 설정이다. 1. singleton - 하나의 객체로 공유 - default 값이다. 2. prototype - 요청마다 객체를 생성한다. 2-1 prototype scoped bean은 다른 scope과 다르게 자동으로 destroy-method가 호출되지 않는다. 2-2 그렇기 때문에 반드시 코드에서 리소스 해제까지 완료해야 한다. 2-3. destroy method를 호출하는 방법이 있긴 한데 필요시까지 잘안쓰니까 정리 안 한다. 3. request - web request 범위 4. session - web session 범위 5. global-session - application 전체에 걸친 범위 How to use 1. Be..

Spring/Spring Basic 2020. 4. 22. 17:21
이전 1 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 도커 개발환경 참고
  • AWS ARN 구조
  • Immuability에 관한 설명
  • 자바스크립트 멀티 비동기 함수 호출 참고
  • WSDL 참고
  • SOAP 컨슈머 참고
  • MySql dump 사용법
  • AWS Lambda with Addon
  • NFC 드라이버 linux 설치
  • electron IPC
  • mifare classic 강의
  • go module 관련 상세한 정보
  • C 메모리 찍어보기
  • C++ Addon 마이그레이션
  • JAX WS Header 관련 stackoverflow
  • SOAP Custom Header 설정 참고
  • SOAP Custom Header
  • SOAP BindingProvider
  • dispatcher 사용하여 설정
  • vagrant kvm으로 사용하기
  • git fork, pull request to the …
  • vagrant libvirt bridge network
  • python, js의 async, await의 차이
  • go JSON struct 생성
  • Netflix Kinesis 활용 분석
  • docker credential problem
  • private subnet에서 outbound IP 확…
  • 안드로이드 coroutine
  • kotlin with, apply, also 등
  • 안드로이드 초기로딩이 안되는 경우
  • navigation 데이터 보내기
  • 레이스 컨디션 navController
  • raylib
TAG
  • form
  • 스프링부트
  • mapping
  • Security
  • jsp
  • WebMvc
  • 매핑
  • MYSQL
  • one-to-one
  • 설정
  • 스프링
  • 하이버네이트
  • hibernate
  • Validation
  • crud
  • login
  • RestTemplate
  • Rest
  • Spring
  • spring boot
  • 설정하기
  • Many-To-Many
  • one-to-many
  • Angular
  • 상속
  • XML
  • Spring Security
  • 외부파일
  • 로그인
  • 자바
more
250x250

Blog is powered by Tistory / Designed by Tistory

티스토리툴바