application.yml
spring: datasource: username: root password: 123456 url: jdbc:mysql://localhost:3306/bd1906?serverTimezone=GMT%2B8 driver-class-name: com.mysql.cj.jdbc.Driver server: port: 8080
Controller层
@Controller
public class loginController {
@Autowired
private JdbcTemplate jdbcTemplate;
@RequestMapping("/index")
public String border(){
return "/index.html";
}
@RequestMapping("/login")
public String getUserFront(){
return "/login.html";
}
@RequestMapping(value = "/log",method = RequestMethod.POST)
@ResponseBody
public String log(String name,String psd){
String sql = "select * from user where username = '"+ name +"' and password = '"+psd+"'";
List登录页面
login 智能互联装备协同管理平台![]()
![]()
![]()