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

io.rocketbase.commons.config.AuthJpaAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 4.4.1
Show newest version
package io.rocketbase.commons.config;

import io.rocketbase.commons.model.AppInviteJpaEntity;
import io.rocketbase.commons.model.AppUserJpaEntity;
import io.rocketbase.commons.repository.AppInviteJpaRepository;
import io.rocketbase.commons.repository.AppUserJpaRepository;
import io.rocketbase.commons.service.AppInviteJpaServiceImpl;
import io.rocketbase.commons.service.AppInvitePersistenceService;
import io.rocketbase.commons.service.AppUserJpaServiceImpl;
import io.rocketbase.commons.service.AppUserPersistenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@AutoConfigureBefore(AuthServiceAutoConfiguration.class)
public class AuthJpaAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public AppUserPersistenceService appUserPersistenceService(@Autowired AppUserJpaRepository appUserJpaRepository) {
        return new AppUserJpaServiceImpl(appUserJpaRepository);
    }

    @Bean
    @ConditionalOnMissingBean
    public AppInvitePersistenceService appInvitePersistenceService(@Autowired AppInviteJpaRepository appInviteJpaRepository) {
        return new AppInviteJpaServiceImpl(appInviteJpaRepository);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy