当前位置: 首页 > news >正文

怎么做网站赚大钱成都广告公司地址

怎么做网站赚大钱,成都广告公司地址,PHP网站开发技术期末作品,社区建站网站系统基于SSM#xff08;Spring Spring MVC MyBatis#xff09;框架的咖啡馆管理系统是一个综合性的Web应用程序#xff0c;用于管理和优化咖啡馆的运营。下面我将提供一个详细的案例程序概述#xff0c;包括主要的功能模块和技术栈介绍。 项目概述 功能需求 用户管理…基于SSMSpring Spring MVC MyBatis框架的咖啡馆管理系统是一个综合性的Web应用程序用于管理和优化咖啡馆的运营。下面我将提供一个详细的案例程序概述包括主要的功能模块和技术栈介绍。 项目概述 功能需求 用户管理管理员可以添加、删除、修改和查询用户信息。员工管理记录员工信息如姓名、职位、工资等。菜单管理支持对菜单项的增删改查操作包括菜品名称、价格、类别等。订单管理处理订单信息记录订单详情包括下单时间、顾客信息、订单状态等。库存管理记录原材料库存当库存低于预设值时发出警告。财务报表生成各类报表如收入报表、支出报表等。权限管理不同用户有不同的操作权限。顾客反馈记录顾客的反馈信息用于改进服务质量。 技术栈 前端HTML, CSS, JavaScript, JSP或Thymeleaf等模板引擎后端 框架Spring, Spring MVC, MyBatis数据库MySQL服务器Tomcat 工具Maven项目构建和依赖管理 项目结构 CoffeeShopManagementSystem ├── src │ ├── main │ │ ├── java │ │ │ └── com.example.coffeeshop │ │ │ ├── controller │ │ │ ├── service │ │ │ ├── dao │ │ │ └── entity │ │ ├── resources │ │ │ ├── mapper │ │ │ ├── spring │ │ │ └── mybatis-config.xml │ │ └── webapp │ │ ├── WEB-INF │ │ │ └── web.xml │ │ └── index.jsp │ └── test │ └── java │ └── com.example.coffeeshop └── pom.xml关键技术点 Spring配置使用spring-context和spring-webmvc进行IoC容器和Web应用配置。MyBatis配置配置数据源、事务管理器以及映射文件路径。数据访问层通过MyBatis的Mapper接口实现对数据库的操作。服务层处理业务逻辑调用DAO层完成数据操作。控制层处理前端请求调用服务层并返回响应结果给前端。页面展示使用JSP或Thymeleaf等技术实现前后端交互。 示例代码片段 MyBatis Mapper XML !-- src/main/resources/mapper/MenuItemMapper.xml -- mapper namespacecom.example.coffeeshop.dao.MenuItemDaoselect idgetMenuItemById resultTypecom.example.coffeeshop.entity.MenuItemSELECT * FROM menu_item WHERE id #{id}/select /mapperEntity 类 // src/main/java/com/example/coffeeshop/entity/MenuItem.java public class MenuItem {private int id;private String name;private String category;private double price;// Getters and Setters }DAO 接口 // src/main/java/com/example/coffeeshop/dao/MenuItemDao.java public interface MenuItemDao {MenuItem getMenuItemById(int id);ListMenuItem getAllMenuItems();void addMenuItem(MenuItem menuItem);void updateMenuItem(MenuItem menuItem);void deleteMenuItem(int id); }Service 层 // src/main/java/com/example/coffeeshop/service/MenuItemService.java Service public class MenuItemService {Autowiredprivate MenuItemDao menuItemDao;public MenuItem getMenuItemById(int id) {return menuItemDao.getMenuItemById(id);}public ListMenuItem getAllMenuItems() {return menuItemDao.getAllMenuItems();}public void addMenuItem(MenuItem menuItem) {menuItemDao.addMenuItem(menuItem);}public void updateMenuItem(MenuItem menuItem) {menuItemDao.updateMenuItem(menuItem);}public void deleteMenuItem(int id) {menuItemDao.deleteMenuItem(id);} }Controller 层 // src/main/java/com/example/coffeeshop/controller/MenuItemController.java Controller RequestMapping(/menu) public class MenuItemController {Autowiredprivate MenuItemService menuItemService;GetMapping(/{id})public String getMenuItemById(PathVariable int id, Model model) {MenuItem menuItem menuItemService.getMenuItemById(id);model.addAttribute(menuItem, menuItem);return menuItemDetail;}GetMapping(/)public String getAllMenuItems(Model model) {ListMenuItem menuItems menuItemService.getAllMenuItems();model.addAttribute(menuItems, menuItems);return menuItemList;}PostMapping(/)public String addMenuItem(ModelAttribute MenuItem menuItem) {menuItemService.addMenuItem(menuItem);return redirect:/menu/;}PutMapping(/{id})public String updateMenuItem(PathVariable int id, ModelAttribute MenuItem menuItem) {menuItem.setId(id);menuItemService.updateMenuItem(menuItem);return redirect:/menu/;}DeleteMapping(/{id})public String deleteMenuItem(PathVariable int id) {menuItemService.deleteMenuItem(id);return redirect:/menu/;} }数据库表设计 CREATE TABLE user (id INT AUTO_INCREMENT PRIMARY KEY,username VARCHAR(50) NOT NULL,password VARCHAR(50) NOT NULL,role VARCHAR(20) NOT NULL );CREATE TABLE employee (id INT AUTO_INCREMENT PRIMARY KEY,name VARCHAR(50) NOT NULL,position VARCHAR(50) NOT NULL,salary DOUBLE NOT NULL );CREATE TABLE menu_item (id INT AUTO_INCREMENT PRIMARY KEY,name VARCHAR(50) NOT NULL,category VARCHAR(50) NOT NULL,price DOUBLE NOT NULL );CREATE TABLE order (id INT AUTO_INCREMENT PRIMARY KEY,customer_name VARCHAR(50) NOT NULL,order_time DATETIME NOT NULL,total_price DOUBLE NOT NULL,status VARCHAR(20) NOT NULL );CREATE TABLE order_item (id INT AUTO_INCREMENT PRIMARY KEY,order_id INT NOT NULL,menu_item_id INT NOT NULL,quantity INT NOT NULL,FOREIGN KEY (order_id) REFERENCES order(id),FOREIGN KEY (menu_item_id) REFERENCES menu_item(id) );CREATE TABLE inventory (id INT AUTO_INCREMENT PRIMARY KEY,item_name VARCHAR(50) NOT NULL,quantity INT NOT NULL,threshold INT NOT NULL );CREATE TABLE feedback (id INT AUTO_INCREMENT PRIMARY KEY,customer_name VARCHAR(50) NOT NULL,content TEXT NOT NULL,feedback_time DATETIME NOT NULL );运行项目 数据库初始化运行上述SQL脚本创建数据库表。配置文件在src/main/resources目录下配置applicationContext.xml、spring-mvc.xml和mybatis-config.xml。启动服务器使用Tomcat服务器启动项目。 示例配置文件 applicationContext.xml !-- src/main/resources/spring/applicationContext.xml -- beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexmlns:contexthttp://www.springframework.org/schema/contextxmlns:txhttp://www.springframework.org/schema/txxsi:schemaLocationhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsdhttp://www.springframework.org/schema/txhttp://www.springframework.org/schema/tx/spring-tx.xsdcontext:component-scan base-packagecom.example.coffeeshop /bean iddataSource classorg.springframework.jdbc.datasource.DriverManagerDataSourceproperty namedriverClassName valuecom.mysql.cj.jdbc.Driver /property nameurl valuejdbc:mysql://localhost:3306/coffeeshop?useSSLfalseserverTimezoneUTC /property nameusername valueroot /property namepassword valuepassword //beanbean idsqlSessionFactory classorg.mybatis.spring.SqlSessionFactoryBeanproperty namedataSource refdataSource /property nameconfigLocation valueclasspath:mybatis-config.xml /property namemapperLocations valueclasspath:mapper/*.xml //beanbean classorg.mybatis.spring.mapper.MapperScannerConfigurerproperty namebasePackage valuecom.example.coffeeshop.dao //beantx:annotation-driven transaction-managertransactionManager /bean idtransactionManager classorg.springframework.jdbc.datasource.DataSourceTransactionManagerproperty namedataSource refdataSource //bean /beansspring-mvc.xml !-- src/main/resources/spring/spring-mvc.xml -- beans xmlnshttp://www.springframework.org/schema/beansxmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexmlns:mvchttp://www.springframework.org/schema/mvcxmlns:contexthttp://www.springframework.org/schema/contextxsi:schemaLocationhttp://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsdcontext:component-scan base-packagecom.example.coffeeshop /mvc:annotation-driven /bean classorg.springframework.web.servlet.view.InternalResourceViewResolverproperty nameprefix value/WEB-INF/views/ /property namesuffix value.jsp //bean /beans
http://www.hkea.cn/news/14499976/

相关文章:

  • 怎么样让网站正常解析微信公众号运营策划
  • 票务网站开发特色软件app推荐
  • 公司网站开发费用兴田德润在哪儿哪家公司
  • 济南网站建设需要多少钱网站开发的技术分类
  • 网站建设怎么样做账网站建设公司浙江
  • 重庆市建设施工安全网站2021年最新热点素材
  • 企业网站建设参考资料开发者 电影
  • 公司网站销售平台建设费分录网站建设公司的问答营销案例
  • 网站后台文件下载咨询网站源码
  • 烟台网站制作公司上海猎头公司排名
  • 小说网站制作开源为什么网站 关键词策划
  • 网页qq登录保护功能怎么关闭连云港网站推广优化
  • 南京企业网站搭建网站怎么提高百度权重
  • 网站后台管理系统登录总工会网站建设方案
  • dedecms 模版网站门源网站建设公司
  • 网站设计的知识技能安阳王新刚
  • 织梦批量修改网站源代码制作ppt的软件是什么
  • 淘宝上做网站网站建设服务承诺包括什么
  • 如何找到网站的模板页面移动互联网应用程序清理整合情况
  • 网站做淘宝客有什么要求镇江建工建设集团网站
  • 东莞网站设计师网站流量指标
  • 如何提高网站响应速度网站购买空间多少钱
  • 营销型企业网站的类型wordpress学生
  • 3000ok新开传奇网站在线课程网站开发价格
  • tp3企业网站开发百度云成都建站模板网站开发
  • 不同类型的购物网站会员管理系统app
  • 网站淘宝客怎么做的东莞网站建设工作室
  • 晋源网站建设成都网站建设今明互联
  • 建设专业网站网络教师做爰网站
  • 教育行业网站建设价格质量品质好的装修公司