Created
March 25, 2019 04:34
-
-
Save dvliman/cb4b250151757fcf8abd69fecf847e5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/kotlin/com/dvliman/demo/Beans.kt | |
package com.dvliman.demo | |
import org.davidmoten.rx.jdbc.Database | |
import org.springframework.context.annotation.Bean | |
import org.springframework.context.annotation.Configuration | |
@Configuration | |
class Beans { | |
@Bean | |
fun providesDatabaseConn(config: Config): Database | |
= Database.from(config.dbUrl!!, Runtime.getRuntime().availableProcessors() * 2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment