From c1f737c842338d4c83223caa47a7e10606fef541 Mon Sep 17 00:00:00 2001 From: Thomas Turrell-Croft Date: Mon, 18 May 2020 22:35:57 +0200 Subject: [PATCH] Polish JDBC Authentication Doc * Correct documented default schema to match default schema exposed as classpath resource * Fix Java example of adding users to JdbcUserDetailsManager Fixes gh-8550 --- .../_includes/servlet/authentication/unpwd/jdbc.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/authentication/unpwd/jdbc.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/authentication/unpwd/jdbc.adoc index ddbdc8a4de..23198edc99 100644 --- a/docs/manual/src/docs/asciidoc/_includes/servlet/authentication/unpwd/jdbc.adoc +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/authentication/unpwd/jdbc.adoc @@ -35,7 +35,7 @@ The default schema is also exposed as a classpath resource named `org/springfram ---- create table users( username varchar_ignorecase(50) not null primary key, - password varchar_ignorecase(50) not null, + password varchar_ignorecase(500) not null, enabled boolean not null ); @@ -169,7 +169,8 @@ UserDetailsManager users(DataSource dataSource) { .roles("USER", "ADMIN") .build(); JdbcUserDetailsManager users = new JdbcUserDetailsManager(dataSource); - users.createUser() + users.createUser(user); + users.createUser(admin); } ----