package com.ruoyi.biemo.mongodb.controller;


import com.ruoyi.biemo.mongodb.entity.Topic;
import com.ruoyi.biemo.mongodb.utils.MongoHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @author makesoft
 * @version 1.0
 * @date 2021/1/14 11:19
 */
@RestController
@RequestMapping(value = "/mongo")
public class TestMongoController {

    @Autowired
    private MongoHelper mongoHelper;

    @GetMapping(value = "/insert")
    public String insert(@RequestBody Topic topic) {
        return mongoHelper.insert(topic);
    }



}
