Tag: spelevaluationexception

无法找到SpelEvaluationException方法

我正面临下一个问题,当我尝试使用SpEL将用户传递给服务方法时, evaluate expression=”commonService.userTest(user)” result=”flowScope.user” spring引发了以下exception: org.springframework.expression.spel.SpelEvaluationException:EL1004E:(pos 14):方法调用:在com.sun.proxy上找不到方法userTest(com.x.domain.common.User。)$ Proxy114类型 但是,当我传递纯文本而不是User对象时, evaluate expression=”commonService.userTest(‘Hello’)” result=”flowScope.user” 没有错误。 @Entity @Table(name = “users”) @Getter @Setter @NoArgsConstructor @Slf4j public class User extends BaseEntity implements UserDetails { @Column(unique = true) @NotEmpty private String username; @Column @NotEmpty @Size(min = 5) private String password; } @Service(“commonService”) public class CommonServiceImpl implements CommonService { @Transactional(readOnly = true) […]

SpelEvaluationException:EL1007E:(pos 43):在null上找不到字段或属性“group”

我为我的Web应用程序完全配置了SPRING METHOD安全性。 (启用PRE / POST注释)。 但最近我遇到了一个奇怪的问题。 总结如下: POJOS摘要 // User Class public class User { int id; String name; // getters and setters } // Group Class public class Group { int id; String name; // getters and setters } // GroupMembership class public class GroupMembership { private int id; private User user; private Group […]