mirror of
https://github.com/wxd-gaming/test-all.git
synced 2026-06-04 01:29:54 +08:00
【新增】lua测试
This commit is contained in:
33
spring-lua/lua/index.lua
Normal file
33
spring-lua/lua/index.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
||||
--- Created by troy-chen.
|
||||
--- DateTime: 2024/7/27 下午11:36
|
||||
---
|
||||
|
||||
function root(request, response, postBody)
|
||||
responseUtil:responseText(response, "hello world")
|
||||
end
|
||||
|
||||
function index(request, response, postBody)
|
||||
print("")
|
||||
print(request:getServletPath())
|
||||
print("request = " .. tostring(request))
|
||||
print("response = " .. tostring(response))
|
||||
responseUtil:responseText(response, "lua -- dd")
|
||||
end
|
||||
|
||||
function index3(request, response, postBody)
|
||||
print("index3")
|
||||
local obj = { error = 0, msg = "ok" };
|
||||
responseUtil:responseObj(response, obj)
|
||||
end
|
||||
|
||||
function paramsTest(p1, p2, p3, p4, p5, p6)
|
||||
print("p1 = " .. tostring(p1)
|
||||
.. "; p2 = " .. tostring(p2)
|
||||
.. "; p3 = " .. tostring(p3)
|
||||
.. "; p4 = " .. tostring(p4)
|
||||
.. "; p5 = " .. tostring(p5)
|
||||
)
|
||||
return { "ok", "ok" }
|
||||
end
|
||||
Reference in New Issue
Block a user