1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.shiro.spring.config;
20
21 import org.apache.shiro.authc.Authenticator;
22 import org.apache.shiro.authc.pam.AuthenticationStrategy;
23 import org.apache.shiro.authz.Authorizer;
24 import org.apache.shiro.event.EventBus;
25 import org.apache.shiro.mgt.*;
26 import org.apache.shiro.realm.Realm;
27 import org.apache.shiro.session.mgt.SessionFactory;
28 import org.apache.shiro.session.mgt.SessionManager;
29 import org.apache.shiro.session.mgt.eis.SessionDAO;
30 import org.springframework.context.annotation.Bean;
31 import org.springframework.context.annotation.Configuration;
32 import org.springframework.context.annotation.Import;
33
34 import java.util.List;
35
36
37
38
39 @Configuration
40 @Import({ShiroBeanConfiguration.class})
41 public class ShiroConfiguration extends AbstractShiroConfiguration {
42
43
44 @Bean
45 @Override
46 protected SessionsSecurityManager securityManager(List<Realm> realms) {
47 return super.securityManager(realms);
48 }
49
50 @Bean
51 @Override
52 protected SessionManager sessionManager() {
53 return super.sessionManager();
54 }
55
56 @Bean
57 @Override
58 protected SubjectDAO subjectDAO() {
59 return super.subjectDAO();
60 }
61
62 @Bean
63 @Override
64 protected SessionStorageEvaluator sessionStorageEvaluator() {
65 return super.sessionStorageEvaluator();
66 }
67
68 @Bean
69 @Override
70 protected SubjectFactory subjectFactory() {
71 return super.subjectFactory();
72 }
73
74 @Bean
75 @Override
76 protected SessionFactory sessionFactory() {
77 return super.sessionFactory();
78 }
79
80 @Bean
81 @Override
82 protected SessionDAO sessionDAO() {
83 return super.sessionDAO();
84 }
85
86 @Bean
87 @Override
88 protected Authorizer authorizer() {
89 return super.authorizer();
90 }
91
92 @Bean
93 @Override
94 protected AuthenticationStrategy authenticationStrategy() {
95 return super.authenticationStrategy();
96 }
97
98 @Bean
99 @Override
100 protected Authenticator authenticator() {
101 return super.authenticator();
102 }
103
104 @Bean
105 @Override
106 protected RememberMeManager rememberMeManager() {
107 return super.rememberMeManager();
108 }
109 }