41 lines
1.0 KiB
Java
41 lines
1.0 KiB
Java
package com.muyu.controller;
|
|
|
|
import com.muyu.common.Result;
|
|
import com.muyu.domain.model.MqttServerModel;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
/**
|
|
* @author DongZl
|
|
* @description: 车辆上线默认类
|
|
* @Date 2023-11-30 下午 02:59
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/verify")
|
|
public class VerifyController {
|
|
|
|
|
|
@Value("${mqtt.server.host}")
|
|
private String broker;
|
|
|
|
@Value("${mqtt.server.topic}")
|
|
private String topic;
|
|
|
|
|
|
/**
|
|
* 新增车辆默认上线主题
|
|
* @return 默认返回test
|
|
*/
|
|
@PostMapping("/vehicleConnection")
|
|
public Result<MqttServerModel> vehicleConnection(){
|
|
return Result.success(
|
|
MqttServerModel.builder()
|
|
.broker(broker)
|
|
.topic(topic)
|
|
.build()
|
|
);
|
|
}
|
|
}
|