mirror of https://github.com/usbharu/Hideout.git
Merge pull request #68 from usbharu/bugfix/fix-conditional-parameter
fix: mongo-dbを選択してもエラーが出ていたのを修正
This commit is contained in:
commit
6b632c81c7
|
@ -11,7 +11,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ConditionalOnProperty(name = ["hideout.job-queue.type"], havingValue = "rdb")
|
@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "false", matchIfMissing = true)
|
||||||
class KJobJobQueueParentService(private val database: Database) : JobQueueParentService {
|
class KJobJobQueueParentService(private val database: Database) : JobQueueParentService {
|
||||||
|
|
||||||
private val logger = LoggerFactory.getLogger(this::class.java)
|
private val logger = LoggerFactory.getLogger(this::class.java)
|
||||||
|
|
|
@ -11,7 +11,7 @@ import dev.usbharu.hideout.domain.model.job.HideoutJob as HJ
|
||||||
import kjob.core.dsl.JobContextWithProps as JCWP
|
import kjob.core.dsl.JobContextWithProps as JCWP
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ConditionalOnProperty(name = ["hideout.job-queue.type"], havingValue = "rdb", matchIfMissing = true)
|
@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "false", matchIfMissing = true)
|
||||||
class KJobJobQueueWorkerService(private val database: Database) : JobQueueWorkerService {
|
class KJobJobQueueWorkerService(private val database: Database) : JobQueueWorkerService {
|
||||||
|
|
||||||
val kjob by lazy {
|
val kjob by lazy {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import dev.usbharu.hideout.domain.model.job.HideoutJob as HJ
|
||||||
import kjob.core.dsl.JobContextWithProps as JCWP
|
import kjob.core.dsl.JobContextWithProps as JCWP
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "", matchIfMissing = false)
|
@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "true", matchIfMissing = false)
|
||||||
class KJobMongoJobQueueWorkerService : JobQueueWorkerService {
|
class KJobMongoJobQueueWorkerService : JobQueueWorkerService {
|
||||||
val kjob by lazy {
|
val kjob by lazy {
|
||||||
kjob(Mongo) {
|
kjob(Mongo) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "", matchIfMissing = false)
|
@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "true", matchIfMissing = false)
|
||||||
class KjobMongoJobQueueParentService : JobQueueParentService {
|
class KjobMongoJobQueueParentService : JobQueueParentService {
|
||||||
private val kjob = kjob(Mongo) {
|
private val kjob = kjob(Mongo) {
|
||||||
connectionString = "mongodb://localhost"
|
connectionString = "mongodb://localhost"
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.springframework.data.mongodb.core.query.Query
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ConditionalOnProperty("hideout.use-mongodb", havingValue = "", matchIfMissing = false)
|
@ConditionalOnProperty("hideout.use-mongodb", havingValue = "true", matchIfMissing = false)
|
||||||
class MongoGenerateTimelineService(
|
class MongoGenerateTimelineService(
|
||||||
private val statusQueryService: StatusQueryService,
|
private val statusQueryService: StatusQueryService,
|
||||||
private val mongoTemplate: MongoTemplate
|
private val mongoTemplate: MongoTemplate
|
||||||
|
|
Loading…
Reference in New Issue