Skip to content

Commit

Permalink
feat : add database custom options in config
Browse files Browse the repository at this point in the history
  • Loading branch information
fhebuterne committed Mar 9, 2024
1 parent c38e0b4 commit 5d65b3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class MarketPlace(override var loader: JavaPlugin) : BootstrapLoader {
)
} else {
Database.connect(
url = "jdbc:mysql://${conf.database.hostname}:${conf.database.port}/${conf.database.database}?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",
url = "jdbc:mysql://${conf.database.hostname}:${conf.database.port}/${conf.database.database}?${conf.database.options}",
driver = "fr.fabienhebuterne.marketplace.libs.mysql.cj.jdbc.Driver",
user = conf.database.username,
password = conf.database.password
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ data class Database(
val port: Int = 3306,
val username: String = "minecraft",
val password: String = "",
val type: DatabaseType = DatabaseType.MYSQL
val type: DatabaseType = DatabaseType.MYSQL,
val options: String = "useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC"
)

enum class DatabaseType {
Expand Down

0 comments on commit 5d65b3f

Please sign in to comment.