When doing something in an SBT console which requires the loading of Case Class instances via fig or jerkson if the code is executed within inClassLoader
it will produce a result rather than a ClassNotFoundException
.
For example in Persnicketly:
val articles = inClassLoader(classOf[com.persnicketly.persistence.Connection$]) {
ScoredArticleDao.select(from = 60, count = 100)
}
Will successfully load MongoDB configuration from config.json
, access the db and retrieve articles.