All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dhi13man.spring.datasource.annotations.TargetSecondaryDataSources Maven / Gradle / Ivy

Go to download

To mitigate Spring's limitations with multiple data sources in a single service, this library provides two custom annotations in Java that automatically generate all the required bean definition configurations and package-segregated repositories, for each data source.

The newest version!
package io.github.dhi13man.spring.datasource.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation to create copies of the repositories in the relevant packages, and autoconfigure them
 * to use the relevant secondary data sources.
 * 

* Will generate all relevant boilerplate code and beans. */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.CLASS) public @interface TargetSecondaryDataSources { /** * The array of {@link TargetSecondaryDataSource} annotations. * * @return the array of {@link TargetSecondaryDataSource} annotations */ TargetSecondaryDataSource[] value(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy