scala - Is possible to avoid declaring StaticDatabaseConfig annotation in every class using tsql in Slick 3.x? -
if want use compiled time queries in slick 3.x, need declare staticdatabaseconfig annotation in every class using tsql.
is there way avoid , set global config?
@staticdatabaseconfig("file:src/main/resources/application.conf#tsql") object persistenceservice { val database = database.forconfig("database") database.run( tsql"select now()" ) }
change configuration file. configurate database driver.
Comments
Post a Comment