package com.lantone.message.web;

import com.lantone.message.config.MqttConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Description: 即时通讯页面示例
 * @author: rengb
 * @time: 2021/1/5 18:27
 */
@ApiIgnore
@Controller
@RequestMapping("/pageSample")
public class PageSampleController {

    @Autowired
    private MqttConfig mqttConfig;

    @GetMapping("/sample")
    public String index(ModelMap model) {
        model.addAttribute("mqtt_url", mqttConfig.getFrontUrl());
        return "sample";
    }

}