Skip to content

Instantly share code, notes, and snippets.

@sonus21
Last active April 9, 2023 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonus21/0c2711ecaa01e39cefee4eb629d41664 to your computer and use it in GitHub Desktop.
Save sonus21/0c2711ecaa01e39cefee4eb629d41664 to your computer and use it in GitHub Desktop.
Database annotation
/**
* A Database annotation that should be used at controller,worker,consumer,methods or classes
* to route the database traffic to appropriate node.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface Database {
String value() default "";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment