0

So I am using the @Document(collection="xxxxx") mongodb annotation for some pojo classes I have. I am wanting to be able to change "collection=xxxxx" to something like "collection=test_xxxxxx" only when I am running my integration tests so that I can distinguish these collections easily from my documents I generate in my Test environment on my server.

Is there a way to update these with Java code?

Locke
  • 534
  • 8
  • 25
  • 1
    [modify-a-class-definitions-annotation-string-parameter-at-runtime](https://stackoverflow.com/questions/14268981/modify-a-class-definitions-annotation-string-parameter-at-runtime) – HDJEMAI Mar 27 '17 at 17:26

1 Answers1

0

The article is quite old, but perhaps it helps you: http://ayoubelabbassi.blogspot.de/2011/01/how-to-add-annotations-at-runtime-to.html

Markus
  • 1,141
  • 1
  • 9
  • 25