大家好,我是 Spring Boot 的新手,想创建一个功能,在我的搜索框中输入一个数字,并在网页上显示与数据相关的表格。
然后信息应该是可见的。认为我是 Spring Boot 中的菜鸟,并且想要做这个功能请帮助我使用 html css for fromt end。请为我使用控制器类提供一个合适的示例,这是我的控制器类
package com.complaintportal.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.complaintportal.entities.tbl_voicechat;
import com.complaintportal.serv.tbl_voicechatservice;
@org.springframework.stereotype.Controller
public class Controller {
/*
* @Autowired
*
* private tbl_voicechatservice voiceservice;
*/
@RequestMapping("/home")
public String home(Model model) {
model.addAttribute("title", "Welcome to Complaint Portal");
return "home";
}
@RequestMapping("/complaint")
public String complaint(Model model) {
model.addAttribute("title", "Complaint lodge");
return "complaint";
}
@RequestMapping("/minutes")
public String minutes(Model model) {
model.addAttribute("title", "Minutes not updated");
return "minutes";
}
@RequestMapping("/unvoicht")
public String unablevoicechat(Model model) {
model.addAttribute("title", "Complaint lodge");
return "unvoicht";
}
@GetMapping("/login")
public String login() {
return "/login";
}
/*
* @RequestMapping(value = "/user/{ani}", method = RequestMethod.GET) public
* tbl_voicechat getDataByANI(@PathVariable("ani") String ani) { return
* voiceservice.getDataByANI(ani); }
*/
}
请帮助并提供合适的例子