일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- jquery
- 25가지 효율적인 sql작성법
- Random
- 야구게임
- 자바
- full text indexing
- 가변인자
- 추상클래스
- 이클립스
- 다형성
- 전자정부
- 상속
- 로또
- 단축키
- 페이징
- Full text
- 자바 야구게임
- 형변환
- while
- Validations
- 업캐스팅
- IBatis procedure
- 전체
- Login with OAuth Authentication
- 상속예제
- angular2
- 전체텍스트
- 스프링
- 다운캐스팅
- Today
- Total
목록전체 글 (448)
nalaolla
In this article, we will show you three ways to get the current logged in username in Spring Security.1. SecurityContextHolder + Authentication.getName()import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework..
개발환경 스프링 시큐리티(Spring Security)는 스프링 서브 프로젝트 중 하나로 스프링 기반의 어플리케이션을 보호하기 위한 필수적인 프레임워크이다. 스프링을 사용하면서 자체적으로 세션을 이용한 인증방식을 구현한다면 바보같은 짓일 것이다. 스프링 시큐리티는 보안을 체계적으로 관리하며 개발한 스프링 어플리케이션들과 유연하게 연결된다. 그리고 오랜기간 다양한 피드백으로 개발되어 신뢰도가 높을 것이다. 스프링에 최적화된 스프링 시큐리티 보다 안정적인 프레임워크는 아마 없을 것이다. 무엇보다 스프링에서는 스프링 시큐리티를 표준으로 정의하고 있다. 스프링 시큐리티의 기본 예제를 먼저 알아보도록하겠다. 실무에서 사용할 수 없겠지만 스프링 시큐리트가 어떻게 구현되는 지 알 수 있는 예제이다. 프로젝트를 생성하..
Spring Security 에서 커스텀 AuthenticationProvider를 사용하는 예 스프링에서 Spring Security 를 이용하면 사용자를 인증하고 권한에 따라서 특정 경로에 접근하는 것을 제한하는 기능을 설정으로 쉽게 적용할 수 있다. 그러나 설정만으로 모든 것을 처리할 수 있는 것은 아니므로 필요하다면 AuthenticationProvider 인터페이스를 구현하여 authenticate()메소드를 오버라이드하면 인증하는 부분의 로직을 개발자가 모두 작성할 수 있다. 이용자가 로그인 폼에서 데이터를 Spring Security 으로 전송하면 AuthenticationProvider의 authenticate()가 호출되어 인증절차를 진행하는데, 이 메소드를 개발자가 오버라이드하면 된다...
abstract factory pattern은 생산적인 디자인 패턴 중 하나로써 좀 더 factory를 좀 더 생산적으로 만들어 낼 수 있다는 점외에는 factory pattern과 매우 비슷하다.여러분이 java의 factory design pattern에 익숙하다면, 보통은 어떠한 인풋에 대해 factory class안에서 if-else로 다른 sub-class를 반환하는 일련의 과정을 통해 목적을 달성할 것이다.abstract factory pattern에서는 if-else 구문을 없애고, sub-class마다 factory class를 가지게 하고 Abstract Factory에서는 input factory class를 통해 해당 sub-class를 반환한다. 처음보기에는 factory patte..
factory pattern은 유명한 디자인 패턴 중 하나이다. 이것 역시 JDK 및 우리가 잘 알고 있는 Spring, Struts 프레임워크에 많이 사용되고 있다.super class와 여러개의 sub class가 있는 상황에서 input이 발생하면 하나의 sub class를 반환해야 할때 factory pattern이 사용된다. factory class는 client class로 부터 인스턴스를 생성하는 책임을 가져온다.슈퍼 클래스factory pattern에서 super class는 interface, abstract class 또는 일반적인 java class가 될 수 있다. 예제에서 super class 로 abstract class를 사용하는데, 테스팅을 위해 toString() method..
Indonesian ecommerce is one of the most talked about spaces in Southeast Asia’s tech startup world. Players like Lippo Group, Rocket Internet, Sequoia Capital, SoftBank, and many others are taking the archipelago’s online retail business deadly serious. Logistics plays are now happening in Indonesia faster than locals can eat nasi padang. However, as online sales still only account for less than..