Skip to content

Commit bba095f

Browse files
committed
Fix Spring Security integration docs sample
Resolves: #1306
1 parent 61937a9 commit bba095f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2016 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.
@@ -21,7 +21,6 @@
2121
import org.springframework.context.annotation.Configuration;
2222
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
2323
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
24-
import org.springframework.session.ExpiringSession;
2524
import org.springframework.session.FindByIndexNameSessionRepository;
2625
import org.springframework.session.security.SpringSessionBackedSessionRegistry;
2726

@@ -33,7 +32,7 @@
3332
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
3433

3534
@Autowired
36-
FindByIndexNameSessionRepository<ExpiringSession> sessionRepository;
35+
private FindByIndexNameSessionRepository sessionRepository;
3736

3837
@Override
3938
protected void configure(HttpSecurity http) throws Exception {
@@ -45,7 +44,8 @@ protected void configure(HttpSecurity http) throws Exception {
4544
}
4645

4746
@Bean
48-
SpringSessionBackedSessionRegistry sessionRegistry() {
47+
@SuppressWarnings("unchecked")
48+
public SpringSessionBackedSessionRegistry sessionRegistry() {
4949
return new SpringSessionBackedSessionRegistry(this.sessionRepository);
5050
}
5151
}

0 commit comments

Comments
 (0)