diff --git a/komga/src/main/kotlin/org/gotson/komga/Application.kt b/komga/src/main/kotlin/org/gotson/komga/Application.kt index 444953c49..ac5342699 100644 --- a/komga/src/main/kotlin/org/gotson/komga/Application.kt +++ b/komga/src/main/kotlin/org/gotson/komga/Application.kt @@ -4,21 +4,15 @@ import org.gotson.komga.infrastructure.configuration.KomgaProperties import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.boot.runApplication -import org.springframework.context.annotation.Configuration -import org.springframework.context.annotation.Profile import org.springframework.scheduling.annotation.EnableScheduling @SpringBootApplication @EnableConfigurationProperties( KomgaProperties::class ) +@EnableScheduling class Application fun main(args: Array) { runApplication(*args) } - -@Profile("!test") -@Configuration -@EnableScheduling -class SchedulingConfiguration \ No newline at end of file diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/swagger/SwaggerConfiguration.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/swagger/SwaggerConfiguration.kt index 533e580d6..b68f0a68c 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/swagger/SwaggerConfiguration.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/swagger/SwaggerConfiguration.kt @@ -8,7 +8,7 @@ import springfox.documentation.spi.DocumentationType import springfox.documentation.spring.web.plugins.Docket import springfox.documentation.swagger2.annotations.EnableSwagger2 -@Profile("!test") +@Profile("dev", "prod") @Configuration @EnableSwagger2 class SwaggerConfiguration { diff --git a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/RootScannerController.kt b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/RootScannerController.kt index 84fa35b40..6d31a3ecd 100644 --- a/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/RootScannerController.kt +++ b/komga/src/main/kotlin/org/gotson/komga/interfaces/scheduler/RootScannerController.kt @@ -12,7 +12,7 @@ import org.springframework.stereotype.Controller private val logger = KotlinLogging.logger {} -@Profile("!test") +@Profile("dev", "prod") @Controller class RootScannerController( private val libraryManager: LibraryManager, diff --git a/komga/src/main/resources/application-generatesql.yml b/komga/src/main/resources/application-generatesql.yml new file mode 100644 index 000000000..c0c3aaa90 --- /dev/null +++ b/komga/src/main/resources/application-generatesql.yml @@ -0,0 +1,12 @@ +spring: + flyway: + enabled: false + jpa: + properties: + javax: + persistence: + schema-generation: + create-source: metadata + scripts: + action: create + create-target: build/generated/ddl_jpa_creation.sql \ No newline at end of file