io.lsdconsulting.interceptors.http.autoconfigure.HttpHandlerConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lsd-interceptors Show documentation
Show all versions of lsd-interceptors Show documentation
Provides various interceptors to capture events for the lsd-core library to generate sequence diagrams
package io.lsdconsulting.interceptors.http.autoconfigure
import com.lsd.core.LsdContext
import io.lsdconsulting.interceptors.http.common.DefaultHttpInteractionHandler
import io.lsdconsulting.interceptors.http.common.HttpInteractionHandler
import io.lsdconsulting.interceptors.http.naming.DestinationNameMappings
import io.lsdconsulting.interceptors.http.naming.SourceNameMappings
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean
internal class HttpHandlerConfig(
private val defaultSourceNameMapping: SourceNameMappings,
private val defaultDestinationNameMapping: DestinationNameMappings,
) {
private val lsdContext: LsdContext = LsdContext.instance
@Bean
@ConditionalOnMissingBean(name = ["httpInteractionHandlers"])
fun httpInteractionHandlers() = listOf(
DefaultHttpInteractionHandler(
lsdContext,
defaultSourceNameMapping,
defaultDestinationNameMapping
)
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy