mirror of https://github.com/usbharu/Hideout.git
feat: DB自動修復を追加
This commit is contained in:
parent
841289700b
commit
efbf2b0af7
|
@ -86,7 +86,6 @@ dependencies {
|
|||
implementation(libs.bundles.owl.broker)
|
||||
implementation(libs.bundles.spring.boot.oauth2)
|
||||
implementation(libs.bundles.spring.boot.data.mongodb)
|
||||
implementation(libs.bundles.spring.boot.data.mongodb)
|
||||
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
||||
implementation("org.springframework.boot:spring-boot-starter-web")
|
||||
implementation("org.springframework.boot:spring-boot-starter-security")
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package dev.usbharu.hideout.core.config
|
||||
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
@Configuration
|
||||
class FlywayConfig {
|
||||
@Bean
|
||||
fun cleanMigrateStrategy(): FlywayMigrationStrategy {
|
||||
return FlywayMigrationStrategy { migrate ->
|
||||
migrate.repair()
|
||||
migrate.migrate()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,8 +33,6 @@ spring:
|
|||
host: localhost
|
||||
port: 27017
|
||||
database: hideout
|
||||
# username: hideoutuser
|
||||
# password: hideoutpass
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 40MB
|
||||
|
|
Loading…
Reference in New Issue