I develop a web service with spring boot and I use model mapper. I have changed my project sdk from jdk 1.8 to jdk 11 (oracle open jdk) and this warning is appeared:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access using Lookup on org.modelmapper.internal.ProxyFactory (file:/home/omid/.m2/repository/org/modelmapper/modelmapper/2.3.8/modelmapper-2.3.8.jar) to interface java.util.Set
WARNING: Please consider reporting this to the maintainers of org.modelmapper.internal.ProxyFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I config model mapper to skip some fields of some objects such as:
this.modelMapper.addMappings(new PropertyMap<SourceObject, DestinationObject>() {
@Override
protected void configure() {
skip(destination.getField1());
skip(destination.getField2());
}
});
I am using spring boot v2.2.6.RELEASE and modelmapper v2.3.8. Why does this error appear?