参考
https://blog.csdn.net/licheetools/article/details/106316583
背景
今天看着b站做云E办项目,在Springboot整合SpringSecurity出现Illegal overloaded getter method with ambiguous type for property …的问题
分析
在创建Admin类时,使用lombok生成get与set方法,并实现了SpringSecurity的UserDetails方法
并重写了isEnabled()方法
这与lombok生成的get与set方法相冲突
解决方法
在让lombok不生成Enabled属性的get与set方法
@Getter(value = AccessLevel.NONE)
@Setter(value = AccessLevel.NONE)
private Boolean enabled;
再次运行即可运行成功