mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-04-28 13:19:32 -05:00
Remove unused connection factory bean
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
package org.dreamexposure.discal.cam.config
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactories
|
||||
import io.r2dbc.spi.ConnectionFactory
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions
|
||||
import org.dreamexposure.discal.core.config.Config
|
||||
import org.dreamexposure.discal.core.utils.GlobalVal
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.http.codec.ServerCodecConfigurer
|
||||
import org.springframework.http.codec.json.KotlinSerializationJsonDecoder
|
||||
@@ -17,19 +12,6 @@ import org.springframework.web.reactive.config.WebFluxConfigurer
|
||||
@EnableWebFlux
|
||||
class WebFluxConfig: WebFluxConfigurer {
|
||||
|
||||
@Bean(name = ["mysqlDatasource"])
|
||||
fun mysqlConnectionFactory(): ConnectionFactory {
|
||||
return ConnectionFactories.get(ConnectionFactoryOptions.builder()
|
||||
.option(ConnectionFactoryOptions.DRIVER, "pool")
|
||||
.option(ConnectionFactoryOptions.PROTOCOL, "mysql")
|
||||
.option(ConnectionFactoryOptions.HOST, Config.SQL_HOST.getString())
|
||||
.option(ConnectionFactoryOptions.PORT, Config.SQL_PORT.getInt())
|
||||
.option(ConnectionFactoryOptions.USER, Config.SQL_USER.getString())
|
||||
.option(ConnectionFactoryOptions.PASSWORD, Config.SQL_PASS.getString())
|
||||
.option(ConnectionFactoryOptions.DATABASE, Config.SQL_DB.getString())
|
||||
.build())
|
||||
}
|
||||
|
||||
override fun configureHttpMessageCodecs(configurer: ServerCodecConfigurer) {
|
||||
val codecs = configurer.defaultCodecs()
|
||||
codecs.kotlinSerializationJsonDecoder(KotlinSerializationJsonDecoder(GlobalVal.JSON_FORMAT))
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
package org.dreamexposure.discal.client.config
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactories
|
||||
import io.r2dbc.spi.ConnectionFactory
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions
|
||||
import org.dreamexposure.discal.core.config.Config
|
||||
import org.dreamexposure.discal.core.utils.GlobalVal
|
||||
import org.springframework.boot.web.server.ConfigurableWebServerFactory
|
||||
import org.springframework.boot.web.server.ErrorPage
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.http.HttpStatus
|
||||
import org.springframework.http.codec.ServerCodecConfigurer
|
||||
@@ -31,19 +26,6 @@ class WebFluxConfig : WebFluxConfigurer, WebServerFactoryCustomizer<Configurable
|
||||
.allowedOrigins("*")
|
||||
}
|
||||
|
||||
@Bean(name = ["mysqlDatasource"])
|
||||
fun mysqlConnectionFactory(): ConnectionFactory {
|
||||
return ConnectionFactories.get(ConnectionFactoryOptions.builder()
|
||||
.option(ConnectionFactoryOptions.DRIVER, "pool")
|
||||
.option(ConnectionFactoryOptions.PROTOCOL, "mysql")
|
||||
.option(ConnectionFactoryOptions.HOST, Config.SQL_HOST.getString())
|
||||
.option(ConnectionFactoryOptions.PORT, Config.SQL_PORT.getInt())
|
||||
.option(ConnectionFactoryOptions.USER, Config.SQL_USER.getString())
|
||||
.option(ConnectionFactoryOptions.PASSWORD, Config.SQL_PASS.getString())
|
||||
.option(ConnectionFactoryOptions.DATABASE, Config.SQL_DB.getString())
|
||||
.build())
|
||||
}
|
||||
|
||||
override fun configureHttpMessageCodecs(configurer: ServerCodecConfigurer) {
|
||||
val codecs = configurer.defaultCodecs()
|
||||
codecs.kotlinSerializationJsonDecoder(KotlinSerializationJsonDecoder(GlobalVal.JSON_FORMAT))
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
package org.dreamexposure.discal.server.config
|
||||
|
||||
import io.r2dbc.spi.ConnectionFactories
|
||||
import io.r2dbc.spi.ConnectionFactory
|
||||
import io.r2dbc.spi.ConnectionFactoryOptions
|
||||
import org.dreamexposure.discal.core.config.Config
|
||||
import org.dreamexposure.discal.core.utils.GlobalVal
|
||||
import org.springframework.boot.web.server.ConfigurableWebServerFactory
|
||||
import org.springframework.boot.web.server.ErrorPage
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.http.HttpStatus
|
||||
import org.springframework.http.codec.ServerCodecConfigurer
|
||||
@@ -34,19 +29,6 @@ class WebFluxConfig : WebServerFactoryCustomizer<ConfigurableWebServerFactory>,
|
||||
.maxAge(600)
|
||||
}
|
||||
|
||||
@Bean(name = ["mysqlDatasource"])
|
||||
fun mysqlConnectionFactory(): ConnectionFactory {
|
||||
return ConnectionFactories.get(ConnectionFactoryOptions.builder()
|
||||
.option(ConnectionFactoryOptions.DRIVER, "pool")
|
||||
.option(ConnectionFactoryOptions.PROTOCOL, "mysql")
|
||||
.option(ConnectionFactoryOptions.HOST, Config.SQL_HOST.getString())
|
||||
.option(ConnectionFactoryOptions.PORT, Config.SQL_PORT.getInt())
|
||||
.option(ConnectionFactoryOptions.USER, Config.SQL_USER.getString())
|
||||
.option(ConnectionFactoryOptions.PASSWORD, Config.SQL_PASS.getString())
|
||||
.option(ConnectionFactoryOptions.DATABASE, Config.SQL_DB.getString())
|
||||
.build())
|
||||
}
|
||||
|
||||
override fun configureHttpMessageCodecs(configurer: ServerCodecConfigurer) {
|
||||
val codecs = configurer.defaultCodecs()
|
||||
codecs.kotlinSerializationJsonDecoder(KotlinSerializationJsonDecoder(GlobalVal.JSON_FORMAT))
|
||||
|
||||
Reference in New Issue
Block a user