package com.demo.dao; import com.demo.entity.po.SensorInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.stereotype.Repository; @Repository public class SensorInfoDao { @Autowired private MongoTemplate mongoTemplate; public void insert(SensorInfo sensorInfoIos){ mongoTemplate.insert(sensorInfoIos); } }