remove stuff
This commit is contained in:
parent
dad5844b27
commit
8b3af1adc0
@ -138,28 +138,6 @@ object Session {
|
||||
|
||||
}
|
||||
|
||||
fun a() {
|
||||
val a = HashMap<String, String>()
|
||||
a.put("a", "b");
|
||||
a.put("a", "b");
|
||||
a.put("a", "b");
|
||||
a.put("a", "b");
|
||||
|
||||
val b = HashMap<String, String>().apply {
|
||||
put("a", "b");
|
||||
put("a", "b");
|
||||
put("a", "b");
|
||||
put("a", "b");
|
||||
}
|
||||
|
||||
val c: String? = ""
|
||||
val x = c?.get(1)
|
||||
|
||||
c?.apply {
|
||||
//will work only when c is not null
|
||||
}
|
||||
}
|
||||
|
||||
private val sc = DatabaseConfig().apply {
|
||||
loadFromProperties(Properties().apply {
|
||||
setProperty("datasource.db.username", appConfig.dbUser())
|
||||
@ -183,7 +161,6 @@ object Session {
|
||||
fun currentUser() = currentUser.get().userName
|
||||
fun currentTenant() = currentUser.get().tenant
|
||||
fun currentRoles() = currentUser.get().roles
|
||||
fun currentToken() = currentUser.get().token
|
||||
fun currentUserPlants() = currentUser.get().plantIds.mapNotNull {
|
||||
database.find(Plant::class.java)
|
||||
.where()
|
||||
@ -219,14 +196,6 @@ object Session {
|
||||
return "$entity-${"$s".padStart(6, '0')}"
|
||||
}
|
||||
|
||||
val redisUri = appConfig.redisUri().getOrDefault("redis://localhost:6379/0")
|
||||
val redis = JedisPooled(redisUri)
|
||||
|
||||
init {
|
||||
|
||||
logger.warn("RedisUri - $redisUri")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object DataNotFoundException : Exception() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user