Java Apache Vysper服务器配置?
首先,我想告诉你们的是,我想要一个可以与spring集成的聊天服务器,所以我决定使用ApacheVysper,但我找不到合适的文档。 我所发现的只是,但由于我是xmpp新手,我不能正确理解文档。 有谁能帮我配置Spring吗 我已经这样做了:Java Apache Vysper服务器配置?,java,spring,apache,xampp,server,Java,Spring,Apache,Xampp,Server,首先,我想告诉你们的是,我想要一个可以与spring集成的聊天服务器,所以我决定使用ApacheVysper,但我找不到合适的文档。 我所发现的只是,但由于我是xmpp新手,我不能正确理解文档。 有谁能帮我配置Spring吗 我已经这样做了: XMPPServer server = new XMPPServer("chatapp"); server.start(); // choose the storage you want to use S
XMPPServer server = new XMPPServer("chatapp");
server.start();
// choose the storage you want to use
StorageProviderRegistry providerRegistry = new JcrStorageProviderRegistry();
//StorageProviderRegistry providerRegistry = new MemoryStorageProviderRegistry();
final AccountManagement accountManagement = (AccountManagement) providerRegistry.retrieve(AccountManagement.class);
if(!accountManagement.verifyAccountExists(EntityImpl.parse("user1@myembeddedjabber.com"))) {
accountManagement.addUser(EntityImpl.parse("user1@myembeddedjabber.com"), "password1");
}
但是我不知道如何发送和接收信息。我也在尝试同样的方法,所以也许我可以给你一些帮助 我想你错过了以下几点:
TCPEndpoint endpoint = new TCPEndpoint();
server.addEndpoint(endpoint);
server.setStorageProviderRegistry(providerRegistry);
server.addModule(new SoftwareVersionModule());
server.addModule(new EntityTimeModule());
server.addModule(new VcardTempModule());
server.addModule(new XmppPingModule());
server.addModule(new PrivateDataModule());
server.addModule(new RosterModule());
请查看,也许您需要添加一些模块,我添加了以下内容:
TCPEndpoint endpoint = new TCPEndpoint();
server.addEndpoint(endpoint);
server.setStorageProviderRegistry(providerRegistry);
server.addModule(new SoftwareVersionModule());
server.addModule(new EntityTimeModule());
server.addModule(new VcardTempModule());
server.addModule(new XmppPingModule());
server.addModule(new PrivateDataModule());
server.addModule(new RosterModule());
希望我能帮助你
致意
马库斯Hi@Manoj Singh。您是否找到了发送和接收消息的方法?我正在尝试编写一个在Smack和Vysper上本地运行的聊天应用程序。如果是的话,你能告诉我怎么做吗。也许你可以在这里为你的问题添加一个答案,关于你是如何做到这一点的。非常感谢。希望你能帮忙。非常感谢。我尝试过其他一些免费服务。但是谢谢你的帮助。