-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed auto configuration for spring 3
- Loading branch information
Marvin Hofer
committed
Jun 15, 2023
1 parent
99a086d
commit e33171d
Showing
20 changed files
with
425 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 9 additions & 5 deletions
14
...databus-mods-dummy/src/main/scala/org/dbpedia/databus/mods/worker/dummy/DummyWorker.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
package org.dbpedia.databus.mods.worker.dummy | ||
|
||
import ch.qos.logback.classic.{Level, Logger} | ||
import org.dbpedia.databus.mods.core.model.{ModActivity, ModActivityMetadata, ModActivityMetadataBuilder, ModActivityRequest} | ||
import org.dbpedia.databus.mods.worker.springboot.{EnableModWorkerApi, ModWorkerApiProfile} | ||
import org.slf4j.LoggerFactory | ||
import org.springframework.boot.SpringApplication | ||
import org.springframework.boot.autoconfigure.SpringBootApplication | ||
import org.springframework.context.annotation.Bean | ||
|
||
import scala.util.Random; | ||
|
||
@SpringBootApplication | ||
@EnableModWorkerApi(version = "1.0", profile = ModWorkerApiProfile.HttpPoll) | ||
class DummyWorker { | ||
|
||
@Bean | ||
@EnableModWorkerApi(version = "1.0.0", profile = ModWorkerApiProfile.HttpPoll) | ||
def getModActivity: ModActivity = new ModActivity { | ||
def dummyActivity = new ModActivity { | ||
override def perform(request: ModActivityRequest, builder: ModActivityMetadataBuilder): ModActivityMetadata = { | ||
Thread.sleep(1000) | ||
builder.withStatSummary((Random.nextInt(100)/100.0).toString).build() | ||
builder.withStatSummary((Random.nextInt(100) / 100.0).toString).build() | ||
} | ||
} | ||
} | ||
|
||
|
||
object DummyWorker extends App { | ||
val log = LoggerFactory.getLogger("org.spring").asInstanceOf[Logger] | ||
log.setLevel(Level.DEBUG) | ||
SpringApplication.run(classOf[DummyWorker], args: _*) | ||
} | ||
} | ||
|
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.dbpedia.databus.mods.worker.springboot.config.ModWorkerApiAutoConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
databus-mods-server/databus-mods-server-core/application.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.