用SpringSecurity从零搭建pc项目-02 参照这一篇文章吧,比如你不需要做的那么通用,取其中一部分代码即可。 https://www.cnblogs.com/lihaoyang/p/8491792.html