com.jahnelgroup.jackson.security.entity.EntityCreatedByProviderAutoConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jackson-field-security Show documentation
Show all versions of jackson-field-security Show documentation
Provides field level security for Jackson
package com.jahnelgroup.jackson.security.entity
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Primary
import org.springframework.data.annotation.CreatedBy
/**
* Autoconfiguration for [EntityCreatedByProvider].
*
* @author Steven Zgaljic
* @since 1.0.0
*/
@Configuration
@ConditionalOnClass(CreatedBy::class)
class EntityCreatedByProviderAutoConfiguration {
/**
* The default [EntityCreatedByProvider] is [SpringDataEntityCreatedByProvider].
*/
@Bean
@Primary
@ConditionalOnMissingBean(EntityCreatedByProvider::class)
fun entityCreatedByProvider() = SpringDataEntityCreatedByProvider()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy