자바 (14) 썸네일형 리스트형 [Spring] Spring Security 1. Spring Security의 의의 - Spring Security는 Spring 기반의 application의 보안(인증과 권한, 인가 등)을 담당하는 Spring 하위 Framework - '인증'과 '권한'에 대한 부분을 Filter 흐름에 따라 처리 - Filter는 Dispatcher Servlet으로 가기 전에 적용되므로 가장 먼저 URL 요청을 받지만, Interceptor는 Disapatcher와 Controller 사이에 위치한다는 점에서 적용 시기의 차이가 있다. - 보안과 관련하여 체계적으로 많은 옵션 제공 2. Spring Security Architecture 3. Authorization (인증)과 Authentication (인가) - Authorization (인증) :.. [JAVA] this call 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 package pack02; public class ThisCall { private int a; private int b; public ThisCall() { this(0, 0); //this 내 자신의 생성자를 불러라. 0, 0 int 2개를 넣을 수 있는 System.out.println("디폴트 생성자"); //a = b = 0; } public ThisCall(int data) { this(data, 0); System.out.println("생성.. [JAVA] Anonymous Inner Class 익명 내부 클래스 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 package pack02; abstract class Abs{ abstract void disp(); } class MemberInner { private int a = 10; public int b =20; protected static int c = 30; public Abs abs = new Abs() { @Override void disp() { // TODO Auto-generated method stub System.out.println(.. [JAVA] Static Inner Class 스태틱 내부 클래스 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 package pack02; class MemberInner { private int a = 10; public int b =20; protected static int c = 30; static class Member { public void disp() { //System.out.println(a); //System.out.println(b); System.out.println(c); } } } public class InnerClassStatic { public static void main(String[] args) { // TODO Auto-generated me.. [JAVA] LocalInnerClass 로컬 내부 클래스 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 32 33 package pack02; class MemberInner { private int a = 10; public int b =20; protected static int c = 30; public void output() { class Member { public void disp() { System.out.println(a); System.out.println(b); System.out.println(c); } } Member m = new Member(); m.disp(); } } public class InnerClassLocal { pub.. [JAVA] MemberInnerClass 멤버 내부 클래스 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 package pack02; class MemberInner { private int a = 10; public int b =20; protected static int c = 30; class Member { public void disp() { //System.out.println(a); //System.out.println(b); System.out.println(c); } } } public class InnerClassMember { public static void main(String[] args) { // TODO Auto-generated method stub .. [JAVA] ArithmeticsException 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 package pack02; import java.util.Scanner; public class ArithmeticsException { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int num1, num2; try { System.out.println("피제수를 입력하세요 : "); num1 = sc.nextInt(); System.out.println("제수를 입력하세요 : "); //제수가 0일 경우 Arit.. [JAVA] instance of에 대하여 instanceof는 객체타입을 확인하는데 사용한다. 속성은 연산자이고 형변환이 가능한 지 해당 여부를 true 또는 false로 가르쳐준다. 객체 타입이라 하니 어려운 개념 같은데, 주로 부모 객체인지 자식 객체인지 확인하는데 쓴다고 생각하면 된다. 현재 참조하고 있는 클래스를 확인할 수 있는 메소드인 getClass를 함께 알아두면 좋다. instanceof의 사용형식은 ‘객체 + instanceof + 클래스’ 이다. A를 부모, B를 자식 클래스로 세팅하고 두 클래스 간 형변환이 가능한지 확인해보았다. 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 32 33 34 35 36 37 38 39 40.. 이전 1 2 다음