cloud.hedou.abp.starter.AbpContext.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.starter
import org.springframework.beans.factory.getBean
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationContextAware
class AbpContext : ApplicationContextAware {
override fun setApplicationContext(applicationContext: ApplicationContext) {
context = applicationContext
}
companion object {
lateinit var context: ApplicationContext
private set
inline fun getBean(): T = context.getBean()
}
}