|
@@ -19,7 +19,6 @@ import com.gxzc.zen.common.dto.RequestDto
|
|
import com.gxzc.zen.orm.annotation.ZenTransactional
|
|
import com.gxzc.zen.orm.annotation.ZenTransactional
|
|
import com.xxl.job.core.biz.AdminBiz
|
|
import com.xxl.job.core.biz.AdminBiz
|
|
import com.xxl.job.core.rpc.netcom.NetComClientProxy
|
|
import com.xxl.job.core.rpc.netcom.NetComClientProxy
|
|
-import org.slf4j.LoggerFactory
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
import org.springframework.core.io.InputStreamResource
|
|
import org.springframework.core.io.InputStreamResource
|
|
import org.springframework.core.io.Resource
|
|
import org.springframework.core.io.Resource
|
|
@@ -69,6 +68,8 @@ class TestController : BaseController() {
|
|
@GetMapping("logicSelect")
|
|
@GetMapping("logicSelect")
|
|
@Login(action = Action.Skip)
|
|
@Login(action = Action.Skip)
|
|
fun testLogicSelect() {
|
|
fun testLogicSelect() {
|
|
|
|
+ val cookies = getRequest().cookies
|
|
|
|
+ println(cookies)
|
|
// sysDicService.selectList(null)
|
|
// sysDicService.selectList(null)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -183,12 +184,35 @@ class TestController : BaseController() {
|
|
// val path = getRequest().requestURL.replace(Regex(getRequest().requestURI), "")
|
|
// val path = getRequest().requestURL.replace(Regex(getRequest().requestURI), "")
|
|
// println(path)
|
|
// println(path)
|
|
// getResponse().sendRedirect("http://sys.zen.com/sys/#/dashboard")
|
|
// getResponse().sendRedirect("http://sys.zen.com/sys/#/dashboard")
|
|
- val a = getRequest().cookies
|
|
|
|
- println(a)
|
|
|
|
- getResponse().addCookie(Cookie("hsdkhfjsdhfkjsdf", "Setset"))
|
|
|
|
- getResponse().addCookie(Cookie("test", "Setset").apply {
|
|
|
|
- this.domain = "sys.zen.com"
|
|
|
|
|
|
+// val a = getRequest().cookies
|
|
|
|
+// println(a)
|
|
|
|
+// getResponse().addCookie(Cookie("hsdkhfjsdhfkjsdf", "Setset"))
|
|
|
|
+// getResponse().addCookie(Cookie("test", "Setset").apply {
|
|
|
|
+// this.domain = "sys.zen.com"
|
|
|
|
+// })
|
|
|
|
+// getResponse().sendRedirect("http://192.168.1.213:8082/test/testpermission1")
|
|
|
|
+// getRequest().session.setAttribute("test", "test")
|
|
|
|
+ getRequest().session.getAttribute("test")
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("getCookie")
|
|
|
|
+ @Login(action = Action.Skip)
|
|
|
|
+ fun getCookie(): ResponseEntity<*> {
|
|
|
|
+ val cookies = getRequest().cookies
|
|
|
|
+ var ret = Cookie("default", "1")
|
|
|
|
+ if (cookies.isNotEmpty()) {
|
|
|
|
+ ret = cookies[0]
|
|
|
|
+ println(ret.toString())
|
|
|
|
+ }
|
|
|
|
+ return ResponseEntity.ok(ret)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("setCookie")
|
|
|
|
+ @Login(action = Action.Skip)
|
|
|
|
+ fun setCookie() {
|
|
|
|
+ getResponse().addCookie(Cookie("set", "aaaaaa").apply {
|
|
|
|
+ domain = "test.com"
|
|
|
|
+ path = "/"
|
|
})
|
|
})
|
|
- getResponse().sendRedirect("http://192.168.1.213:8082/test/testpermission1")
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|