控制层代码如下:
database.properties设备文件如下:
- package com.npf.controller;
- import java.util.List;
- import java.util.UUID;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.Model;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import com.npf.model.Student;
- import com.npf.service.StudentService;
- @Controller
- public class StudentController {
- @Autowired
- private StudentService studentService;
- @RequestMapping("/student/save")
- public String saveStudent(Student student){
- String id = UUID.randomUUID().toString();
推荐阅读
媒介在工程中,有多种办法来构建一个关键值存储,并且每个设计都对应用模式做了不合的假设。在统计建模,有各类算法来建立一个分类,每一个算法的对数据集有不合的假设。在处理少量的数据时,尽量多的去测验测验更多>>>详细阅读
本文标题:分布式缓存技术redis学习系列----深入理解Spring Redis的使用
地址:http://www.17bianji.com/lsqh/35091.html
1/2 1