-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I wasn't able to add jpa properly to the project, it works locally but when deployed there were missing beans and it kept on failing.
eventually i removed the jpa and defined the data source bean manually.
(note the System.getEnv is an additional hack since loading application.yaml isnt working as well - i opened a diff issue on that matter)
@Bean
open fun dataSource(): DataSource {
val hikariConfig = HikariConfig().apply {
this.isAutoCommit = true
this.driverClassName = "com.mysql.cj.jdbc.Driver"
this.jdbcUrl = System.getenv()["MYSQL_HOST"]
this.username = System.getenv()["MYSQL_USER"]
this.password = System.getenv()["MYSQL_PASS"]
this.connectionTimeout = 60000
this.validationTimeout = 60000
this.maximumPoolSize = 50
}
return HikariDataSource(hikariConfig)
}
Metadata
Metadata
Assignees
Labels
No labels