【发布时间】:2015-04-07 19:15:54
【问题描述】:
我对当局有意见。
原因:PreparedStatementCallback;糟糕的 SQL 语法 [选择 用户名,权威机构,其中用户名 = ?];嵌套的 例外是 org.postgresql.util.PSQLException:错误:关系 “权威”不存在位置:32
我不想实现权限,但不知道如何在 Spring 的 JavaConfig 中禁用它。
@Override
protected void configure(AuthenticationManagerBuilder auth)
throws Exception {
auth.jdbcAuthentication()
.dataSource(dataSource)
.usersByUsernameQuery(
"select username,password,'true' as enabled from users where username=?")
.passwordEncoder(new ShaPasswordEncoder());
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().anyRequest().authenticated().and().formLogin().and().httpBasic();
}
【问题讨论】:
标签: spring postgresql spring-security