Skip to content

Commit fd5115f

Browse files
committed
Fix Spring Security integration docs sample
1 parent a4c39fd commit fd5115f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/src/test/java/docs/security/SecurityConfiguration.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2017 the original author or authors.
2+
* Copyright 2014-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,10 +30,11 @@
3030
*/
3131
// tag::class[]
3232
@Configuration
33-
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
33+
public class SecurityConfiguration<S extends Session>
34+
extends WebSecurityConfigurerAdapter {
3435

3536
@Autowired
36-
private FindByIndexNameSessionRepository<Session> sessionRepository;
37+
private FindByIndexNameSessionRepository<S> sessionRepository;
3738

3839
@Override
3940
protected void configure(HttpSecurity http) throws Exception {
@@ -47,7 +48,7 @@ protected void configure(HttpSecurity http) throws Exception {
4748
}
4849

4950
@Bean
50-
SpringSessionBackedSessionRegistry sessionRegistry() {
51+
public SpringSessionBackedSessionRegistry<S> sessionRegistry() {
5152
return new SpringSessionBackedSessionRegistry<>(this.sessionRepository);
5253
}
5354
}

0 commit comments

Comments
 (0)