Fix deprecation warnings

This commit is contained in:
Vedran Pavic
2022-08-19 23:55:50 +02:00
committed by Rob Winch
parent 8c49d5993f
commit 8e8de48614
66 changed files with 278 additions and 230 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2016 the original author or authors.
* Copyright 2014-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,20 +19,19 @@ package org.springframework.session.mongodb.examples.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.User;
/**
* @author Rob Winch
*/
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
public class SecurityConfig {
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().withUser(
User.withDefaultPasswordEncoder().username("user").password("password").roles("USER").build());
auth.inMemoryAuthentication()
.withUser(User.withUsername("user").password("{noop}password").roles("USER").build());
}
}