增加 multi-tenant-library 到 1.2.5
authorTang Cheng <cheng.tang@supwisdom.com>
Tue, 21 Jan 2020 01:14:27 +0000 (09:14 +0800)
committerTang Cheng <cheng.tang@supwisdom.com>
Tue, 21 Jan 2020 01:14:27 +0000 (09:14 +0800)
build.gradle
payapi/src/main/kotlin/com/supwisdom/dlpay/security.kt
payapi/src/main/resources/application.properties

index 0447958..a860d67 100644 (file)
@@ -102,7 +102,7 @@ subprojects {
             springSocialVersion = '1.1.6.RELEASE'
             springKafkaVersion = '2.2.8.RELEASE'
             postgresVersion = '42.2.5'
-            multiTenantLibVersion = '1.2.4'
+            multiTenantLibVersion = '1.2.5'
         }
         implementation "org.jetbrains.kotlin:kotlin-reflect"
         implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
index da40c22..324c5a6 100644 (file)
@@ -11,6 +11,7 @@ import com.supwisdom.multitenant.jwt.JwtTokenContext
 import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.context.annotation.Bean
 import org.springframework.context.annotation.Configuration
+import org.springframework.context.annotation.Lazy
 import org.springframework.core.annotation.Order
 import org.springframework.security.authentication.AuthenticationManager
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken
@@ -44,6 +45,7 @@ import javax.sql.DataSource
 class ApiJwtAuthenticationFilter : OncePerRequestFilter() {
 
     @Autowired
+    @Lazy
     private lateinit var jwtTokenContext: JwtTokenContext
 
     override fun doFilterInternal(request: HttpServletRequest, response: HttpServletResponse, filterChain: FilterChain) {
index 377a873..efef870 100644 (file)
@@ -45,3 +45,4 @@ multi-tenant.header.key=X-TENANT-ID
 multi-tenant.session.name=tenant-id
 multi-tenant.session.enableSessionScopedBean=false
 multi-tenant.dbschema=public
+multi-tenant.datasource.base-package=com.supwisdom.dlpay