title: SpelEvaluationException Method cannot be found
body: <p>I am facing with the next problem, when I am trying to pass the User to the service method using SpEL, </p>
  
  <pre><code>evaluate expression="commonService.userTest(user)" result="flowScope.user"
  </code></pre>
  
  <p>spring throws me the following exception:</p>
  
  <blockquote>
    <p>org.springframework.expression.spel.SpelEvaluationException: EL1004E:(pos 14): Method call: Method userTest(com.x.domain.common.User) cannot be found on com.sun.proxy.$Proxy114 type</p>
  </blockquote>
  
  <p>But when I am passing a plain text instead of the User object, </p>
  
  <pre><code>evaluate expression="commonService.userTest('Hello')" result="flowScope.user"
  </code></pre>
  
  <p>There are no errors.</p>
  
  <pre><code>@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)
      @Override
      public User userTest(String name) {
          User user = createUser();
          user.setUsername(name);
          return user;
      }
      @Transactional(readOnly = true)
      @Override
      public User userTest(User user) {
          return user;
      }
  }
  </code></pre>