springboot 道闸
时间: 2023-08-23 19:16:55 浏览: 60
回答: 在配置springboot的道闸时,你可以通过application.properties文件进行配置。你需要引入以下配置信息:
spring.mqtt.username = admin
spring.mqtt.password = public
spring.mqtt.url = tcp://127.0.0.1:1883
spring.mqtt.client.id = HDC-DNC
spring.mqtt.default.topic = topic
spring.mqtt.default.completionTimeout = 3000
此外,你还需要在pom.xml文件中引入以下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mqtt</artifactId>
</dependency>
通过这些配置和依赖,你可以使用springboot框架实现道闸的功能。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)