Spring login form example

前端 未结 4 1732
無奈伤痛
無奈伤痛 2020-12-23 01:50

I tried searching in Google, but I could not find any good examples where a username and password are checked with a database for authentication purposes.

In further

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 02:25

    If you're using a database that can be accessed with JDBC then you don't need to create a custom authentication-provider. The authentication-provider already allows you to query the database directly. It'll reduce the required code to 9 lines of XML instead of a multitude of classes.

    I've answered this here with code samples: Spring Security 3 database authentication with Hibernate

提交回复
热议问题