DrunkenPope
DrunkenPope

Reputation: 576

How to set Spring weaver options in Java config class?

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?

Upvotes: 4

Views: 5124

Answers (1)

kriegaex
kriegaex

Reputation: 67417

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.

Upvotes: 1

Related Questions