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

io.lsdconsulting.interceptors.http.autoconfigure.HttpHandlerConfig.kt Maven / Gradle / Ivy

Go to download

Provides various interceptors to capture events for the lsd-core library to generate sequence diagrams

There is a newer version: 8.0.73
Show newest version
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