How to set Spring weaver options in Java config class?

做~自己de王妃 提交于 2019-12-10 17:09:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!