问题
I am using Spring AOP with the provided default DefaultContextLoadTimeWeaver
. I would like to be able to weave persisted entities and I know I have to set a weaver option (warning from console):
warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified
My search only found examples for the configuration in a .xml file, but I would really prefer this to be in my Java configuration class, where all my configurations are. Is there a way to do this?
回答1:
If you read the warning carefully, you learn that it is only about javax.* types which probably you do not want to weave anyway. If so, you can safely ignore the warning.
If anything else is wrong with your aspects, please show some code and explain what is not working. Ideally, provide an SSCCE, otherwise nobody will be able to help you.
来源:https://stackoverflow.com/questions/25974584/how-to-set-spring-weaver-options-in-java-config-class