spring security demo 直接上代码。 这个类似于配置一个shiro.xml redis.xml boot 里面xml用注解取代。 启动类 验证启用: 退出: end. spring 官网 start.spring.io