|
@@ -9,8 +9,11 @@ import org.springframework.core.annotation.Order
|
|
import org.springframework.core.io.ResourceLoader
|
|
import org.springframework.core.io.ResourceLoader
|
|
import org.springframework.http.HttpMethod
|
|
import org.springframework.http.HttpMethod
|
|
import org.springframework.http.HttpStatus
|
|
import org.springframework.http.HttpStatus
|
|
|
|
+import org.springframework.messaging.handler.annotation.MessageMapping
|
|
|
|
+import org.springframework.messaging.handler.annotation.SendTo
|
|
import org.springframework.messaging.simp.SimpMessagingTemplate
|
|
import org.springframework.messaging.simp.SimpMessagingTemplate
|
|
import org.springframework.stereotype.Component
|
|
import org.springframework.stereotype.Component
|
|
|
|
+import org.springframework.stereotype.Controller
|
|
import org.springframework.web.bind.annotation.GetMapping
|
|
import org.springframework.web.bind.annotation.GetMapping
|
|
import org.springframework.web.bind.annotation.PathVariable
|
|
import org.springframework.web.bind.annotation.PathVariable
|
|
import org.springframework.web.bind.annotation.PostMapping
|
|
import org.springframework.web.bind.annotation.PostMapping
|
|
@@ -136,7 +139,6 @@ class BridgeFilter(private val template: SimpMessagingTemplate, val resourceLoad
|
|
val f = File("web")
|
|
val f = File("web")
|
|
if (splPath.size >= itr && f.isDirectory) {
|
|
if (splPath.size >= itr && f.isDirectory) {
|
|
val search = splPath.joinToString("/")
|
|
val search = splPath.joinToString("/")
|
|
-// println("search $search")
|
|
|
|
return f.listFiles()?.filter { it.isDirectory }?.map { it.name }?.map {
|
|
return f.listFiles()?.filter { it.isDirectory }?.map { it.name }?.map {
|
|
Pair(it, resourceLoader.getResource("file:web/$it/$search"))
|
|
Pair(it, resourceLoader.getResource("file:web/$it/$search"))
|
|
}?.filter { it.second.exists() && it.second.file.isFile }?.map { "${it.first}/$search" }?.firstOrNull()
|
|
}?.filter { it.second.exists() && it.second.file.isFile }?.map { "${it.first}/$search" }?.firstOrNull()
|
|
@@ -172,6 +174,17 @@ object Singletons {
|
|
val requestInstance: MutableMap<String, RequestQue> by lazy { mutableMapOf<String, RequestQue>() }
|
|
val requestInstance: MutableMap<String, RequestQue> by lazy { mutableMapOf<String, RequestQue>() }
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+@Controller
|
|
|
|
+class SocketChecker {
|
|
|
|
+ @MessageMapping("/hi")
|
|
|
|
+ @SendTo("/topic/healthCheck")
|
|
|
|
+ @Throws(Exception::class)
|
|
|
|
+ fun greeting(message: MutableMap<*, *>): MutableMap<*, *> {
|
|
|
|
+ return mutableMapOf(Pair("Hi", "I'am Ok"))
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
@RestController
|
|
@RestController
|
|
class BridgeRestController {
|
|
class BridgeRestController {
|
|
@PostMapping("/_response/{id}")
|
|
@PostMapping("/_response/{id}")
|