Skip to main content
Version: 4.6

Customization

This chapter explains how to extend the framework's default behavior.

Extension pointDescription
Custom annotationThe default @DS annotation is not enough and you want your own annotation. See Custom annotation.
Custom datasource providerThe default provider is based on yml/properties configuration; the framework supports loading and initializing datasources from several places at the same time. Commonly used in multi-tenant systems to load the datasources of different tenants from a single tenant registry database. See Custom datasource provider.
Custom load balancing strategyThe built-in choices are round-robin and random. Extension is supported. See Custom load balancing strategy.
Custom aspectSwitch datasources without annotations, driven by configuration. For example, every Service method under a given package whose name starts with select* goes to slave, while those starting with add* go to master. See No-annotation approach.