我需要ServletContext从内部获取@ServerEndpoint,以便找到Spring ApplicationContext并查找Bean.
目前我最好的方法是在JNDI命名上下文中绑定该bean并在其中查找它Endpoint.欢迎任何更好的解决方案.
我也在寻找一种合理的方法来将servlet HttpSession与websocket 同步Session.
我正在使用apexcharts vue绑定来绘制一些条形图。
至于说通过文档应该可以禁用通过设置显示工具栏:假所看到那里。
所以我做到了我的助手功能:
// do-char-options.js
const randomColor = require("randomcolor");
module.exports = labels => ({
toolbar: { show:false },// docs says it should do the trick
colors: randomColor({
luminosity: "light",
hue: "blue",
count: 30
}),
plotOptions: {
bar: { distributed: true, horizontal: true }
},
tooltip: {
theme: "dark"
},
xaxis: {
categories: labels,
color: "white",
labels: {
style: {
colors: ["white"]
}
}
},
yaxis: {
labels: {
style: {
color: "white"
}
}
} …Run Code Online (Sandbox Code Playgroud) 到目前为止,我找到了如何替换 Javalin json 映射器:
https://javalin.io/documentation#configuring-the-json-mapper
但我不想替换它,只是想添加一些 jackson 模块,例如:
https://www.ktorm.org/api-docs/org.ktorm.jackson/-ktorm-module/index.html
如果没有这个,Javalin 无法序列化 ktorm 实体,示例代码在这里
apexcharts ×1
httpsession ×1
java-ee ×1
javalin ×1
javascript ×1
json ×1
kotlin ×1
ktorm ×1
servlets ×1
vue.js ×1
websocket ×1