Customized Backend Implementation
Usage of the Interfaces
The m8ty-adapter-interfaces submodule contains all the interfaces required to implement the adapter.
The classes are divided into the same packages as the API (eu.m8ty.api.adapter.interfaces.*). This makes it possible to quickly find the correct interfaces.
Profiles for the Adapter
Every class (including repository interfaces) that is instantiated by Spring as a bean should be provided with a profile:
@Repository
@Profile(MyBackendConstants.MY_BACKEND_PROFILE)
interface MyBackendAccountRepository: CrudRepository<MyBackendAccountEntity, Long>, MyBackendAccountRepositoryCustom {
fun findAllByAccountId(accountId: String): MyBackendAccountEntity?
}
It is also highly recommended for the overview if the classes have a prefix that uniquely identifies the adapter. This makes it much easier to find the correct class, and you are not disturbed by other classes from other adapters.
Last modified: 05 March 2024