英文:
How to import botbuilder-java into existing Spring Boot application?
问题
我想使用微软推出的新的botbuilder-java SDK,该SDK允许使用Java与Microsoft Teams进行交互,尤其是与Spring Boot集成。
你可以在这里找到该SDK:botbuilder-java
我知道这是一个预览版本的库。然而,我找不到任何相应的Maven插件来进行导入。
那么,我应该如何将这个SDK导入到我的现有Spring Boot应用程序中呢?
谢谢
英文:
I would like to use the new botbuilder-java SDK from Microsoft allowing to work with Microsoft Teams with Java and more especially with Spring Boot.
The SDK can be found here: botbuilder-java
I know this is a preview library. However, I could not find any corresponding maven plugin to import.
So how should I import this SDK into my existing Spring Boot app?
Thank you
答案1
得分: 1
所以最终,我发现我们需要将这些条目添加到pom.xml文件中:
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-connector</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-integration-core</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-integration-spring</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-dialogs</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-ai-luis-v3</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-applicationinsights</artifactId>
<version>[4.6.0,)</version>
</dependency>
您可能需要设置适合您需求的版本。
然后我所做的是将他们的BotController的实现复制并放置在我的项目中作为资源(即端点控制器),以便我可以更改端点名称。
您还需要从样本文件夹复制一些文件以执行您需要的任务。
英文:
So finally, I found out we need to add these entries to the pom.xml:
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-schema</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-connector</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-integration-core</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-integration-spring</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-builder</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-dialogs</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-ai-luis-v3</artifactId>
<version>[4.6.0,)</version>
</dependency>
<dependency>
<groupId>com.microsoft.bot</groupId>
<artifactId>bot-applicationinsights</artifactId>
<version>[4.6.0,)</version>
</dependency>
You may need to set the versions that suit best your needs.
Then what I did is that I copied the implementation of their BotController and put it as Resource (i.e. endpoint controller) in my project so I could change the endpoint name.
You will also need to copy some files from the samples folder to perform the tasks you need.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论