Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ContextHolder의 내용을 가지고 어떤 DataSource를 가져올 지를 판단함.
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
/**
* @author sidnancy
*/
public class RoutingDataSource extends AbstractRoutingDataSource {
@Override
protected Object determineCurrentLookupKey() {
return ContextHolder.getDataSourceType();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment