After upgrade from Spring Boot 1.5 to 2.1 we get Target bean of type com.sun.proxy.$Proxy is not of type of the persistent entity
问题 We upgraded from Spring Boot 1.5.13.RELEASE to 2.1.3.RELEASE and now a POST to Spring Data Rest with a projection is failing with this error: java.lang.IllegalArgumentException: Target bean of type com.sun.proxy.$Proxy313 is not of type of the persistent entity (com.*.*.*.BankAccount)!: com.sun.proxy.$Proxy313 This looks very similar to the old ticket: https://jira.spring.io/si/jira.issueviews:issue-html/DATAREST-1213/DATAREST-1213.html The JUnit test passes: @Test public void