我在aspx-Page上使用signalr 0.4,
var hub = $.connection.FooHub;
hub.disconnected(function () {
log("Server has disconnected");
});
hub.ShowInfo = function (Info) { .... }
$("#Button1").click(function () {
hub.FooFunction('foo');
});
$.connection.hub.start();
Run Code Online (Sandbox Code Playgroud)
集线器定义为:
public class FooHub : Hub, IDisconnect
{
~FooHub()
{
log.Debug("FooHub Destroy");
}
public FooHub()
{
log.Debug("FooHub Startup");
}
public bool FooFunction(string stuff)
{
log.Debug("Hub FooFunction");
Clients.ShowInfo(someInfo);
return true;
}
public Task Disconnect()
{
// Query the database to find the user by it's client id etc. etc.
MyController.Disconnect(Context.ConnectionId);
log.Debug("Hub Disconnnect " + Context.ConnectionId); …Run Code Online (Sandbox Code Playgroud) 我们目前有一种相当复杂的方式将 PostGIS 的 Geometry fieldtype 与 JHipster 一起使用(4.6,目前正在尝试升级到 4.14 - 进展不顺利 - 可能会为此发布另一个问题)
@Column(name = "geometry", columnDefinition="Geometry")
private Geometry geometry
我可能忘记了中间的一些步骤......
问:有没有更好的方法将 postgis 集成到 jhipster 中?
在 github 中,我只发现 jhipster 团队不想将 GIS Extensions 的支持集成到 JHipster/JDL 中,因为它们并非随处可用。