autoconfigure.com.pannoniaexpertise.audit.AuditAutoConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of audit-starter Show documentation
Show all versions of audit-starter Show documentation
Starter project considering the audit mechanism
The newest version!
package autoconfigure.com.pannoniaexpertise.audit;
import com.pannoniaexpertise.audit.AuditUsernameProvider;
import com.pannoniaexpertise.audit.usernameProviders.UsernameProvider;
import java.util.List;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan("com.pannoniaexpertise.audit.*")
public class AuditAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public AuditUsernameProvider provider(List usernameProviders) {
return new PrincipalUsernameProvider(usernameProviders);
}
}