Home > Back-end >  Mysql server
Mysql server

Time:10-13

In Java web development, I intend to
All computer through local browser can access to student information database, and modified such as
This to want how to do

CodePudding user response:

Trouble to provide a general train of thought or related articles

CodePudding user response:

I recently learning of this thing, for SpringMVC + MyBatis + Tomcat can be done, in computer database server installation, configuration of SSM background, made from Tomcat server, use the Spring container management, operated by Mybaits database, front send request to the server, the server to get data and processing after feedback to the front line, if involves the network access, may also make Intranet through,
 @ Controller 
@ RequestMapping ("/r ")
Public class RoleController
{
The @autowired
Private RoleService RoleService;

@ RequestMapping ("/get/{id} ")
Public ModelAndView getRole (@ PathVariable (" id "), an Integer id)
{
ModelAndView modelAndView=new ModelAndView();
ModelAndView. AddObject (" role ", roleService getRole (id));
ModelAndView. SetView (new MappingJackson2JsonView ());

return modelAndView;
}
}

This is part of the controller code, the browser type http://localhost:8080/project name/r/get/66, you can access the database id is 66 characters information, then feedback to the front page, this is the most simple example,
  • Related