org.springframework.beans.NotReadablePropertyException: Invalid property '$jacocoData' of bean class [com.model.AssetType]: Bean property '$jacocoData' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:622)
at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:612)
at com.base.repository.BaseInfoMongoRepository.updateByOrganizationIdAndId(BaseInfoMongoRepository.java:37)
at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
I know this is because JaCoCo instrumented the AssetType class and added some methods to it and Spring reflection logic fails due to that. I tried exclude the class AssetType from being instrumented via however it when running the integration test (which will use this class), it still gets the same error, my question is why AssetType is not excluded for instrumentation in this case?