I have a class which has a custom scope, which is injected into a singleton scope object by way of the proxyMode scope setting. When debugging in STS or Eclipse I am typically able to view variables and inspect their contents, but this is not the case, as it shows some proxied version of the object.
What is seen in Variables tab:
Name: someClass
Value: SomeClass$$EnhancerBySpringCGLIB$$9c15e764 (id=148)
When unzipping this variable, all of its properties have the value of null, but clicking the variable itself does show an accurate representation of the proxied object's toString() method.
There are many additional properties, such as CGLIB$CALLBACK_{N}
, where N is some integer, which seem to lead nowhere concrete when followed and do not seem to show the actual properties of the object someClass
.
Question(s):
- Is there a missing plugin which enables the viewing of these proxied variables?
- Is this user error?
- Is there something I can read on this topic, since I don't even know where to begin?
Class Definition:
@Component
@Scope(scopeName = "myCustomScope", proxyMode = ScopedProxyMode.TARGET_CLASS)
public class SomeClass implements Serializable {
Some previous research on the topic which didn't seem to yield helpful results:
- http://forum.spring.io/forum/spring-projects/aop/7866-problem-when-proxy-class-using-cglib
- https://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/aop.html#aop-proxying -- this doesn't seem to be specific to STS or Eclipse