Design Patterns
策略模式:
观察者模式:
经典单例模式:
private static class AuthenticationHolder { private static final AuthenticationProvider authenticationProvider = new AuthenticationProvider(); } public static final AuthenticationProvider me() { return AuthenticationHolder.authenticationProvider; }