cloud.hedou.abp.auth.AbpWebMvcConfigurer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of abp-spring-boot-starter Show documentation
Show all versions of abp-spring-boot-starter Show documentation
When the functions of ABP cannot meet service requirements, the Spring Boot framework can be used to expand its own services to make use of abundant Java frameworks on the market.
package cloud.hedou.abp.auth
import cloud.hedou.abp.identity.RemoteIdentityService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Configuration
import org.springframework.security.oauth2.jwt.JwtDecoder
import org.springframework.web.method.support.HandlerMethodArgumentResolver
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
/** 将abp的参数解析器添加到配置中 */
@Configuration
class AbpWebMvcConfigurer : WebMvcConfigurer {
@Autowired
private lateinit var apbJwtDecoder: JwtDecoder
@Autowired
private lateinit var remoteIdentityService: RemoteIdentityService
override fun addArgumentResolvers(resolvers: MutableList) {
resolvers.add(cloud.hedou.abp.auth.AbpAuthArgumentResolver(apbJwtDecoder, remoteIdentityService))
}
}