An example project based on SpringBoot integrated with oauth2 ( token persisted on mysql ), swagger2, restful API, druid, mybatis ( generator and pagehelper included).
install plugin
lombok
if you are using IDEA
Create mysql database named
seed
bydb/schema.sql
&db/data.sql
, then Run SpringBoot Application
see
http://localhost:8080/druid/login.html
username
root
and passwordroot
is same as mysql database
run
mvn mybatis-generator:generate
see
http://localhost:8080/swagger-ui.html
use
curl http://localhost:8080/oauth/token -X POST -u client:security -d "grant_type=password&username=admin&password=admin"
to get access token
use
curl http://localhost:8080/user/1 -X DELETE -H "Authorization: Bearer {access token}"
to access authenticated url
https://github.com/ustcwudi/SpringBoot-Seed-Service