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

找人做一下网站大概多少钱百度关键词首页排名

找人做一下网站大概多少钱,百度关键词首页排名,wordpress手机边栏,百度官方网页目录 1 实验内容 2 实验要求 3 思路 4 核心代码 5 实验结果 1 实验内容 简单的线上图书交易系统的web层 2 实验要求 ①采用SpringMVC框架,采用REST风格 ②要求具有如下功能:商品分类、订单、购物车、库存 ③独立完成,编写实验报告 …

目录

1 实验内容

2 实验要求

3 思路

4 核心代码

5 实验结果


1 实验内容

简单的线上图书交易系统的web层

2 实验要求

①采用SpringMVC框架,采用REST风格

②要求具有如下功能:商品分类、订单、购物车、库存

③独立完成,编写实验报告

3 思路

①确保项目结构清晰,按照MVC的结构进行组织

②在pom.xml中添加SpringMVC相关依赖,以及其他可能需要的依赖,比如数据库连接池、模板引擎等:

③配置web.xml文件,配置DispatcherServlet和Spring监听器:

④在WEB-INF目录下创建相关文件,配置相关内容:

⑤在com.exp.controller包下创建控制器类,使用@RestController注解,以REST风格暴露接口

⑥创建JSP文件,用于显示前端页面。

4 核心代码

BookController类

@RestController
@RequestMapping("/books")
public class BookController {

    @Autowired
    private BookService bookService;

    @GetMapping
    public List<Book> getAllBooks() {
        return bookService.getAllBooks();
    }

    @GetMapping("/{id}")
    public Book getBookById(@PathVariable Long id) {
        return bookService.getBookById(id);
    }

    @PostMapping
    public void addBook(@RequestBody Book book) {
        bookService.addBook(book);
    }

    @PutMapping("/{id}")
    public void updateBook(@PathVariable Long id, @RequestBody Book book) {
        book.setId(id);
        bookService.updateBook(book);
    }

    @DeleteMapping("/{id}")
    public void deleteBook(@PathVariable Long id) {
        bookService.deleteBook(id);
    }
}

②OrderController

@RestController
@RequestMapping("/orders")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping
    public List<Order> getAllOrders() {
        return orderService.getAllOrders();
    }

    @GetMapping("/{id}")
    public Order getOrderById(@PathVariable Long id) {
        return orderService.getOrderById(id);
    }

    @PostMapping
    public void addOrder(@RequestBody Order order) {
        orderService.addOrder(order);
    }

    @PutMapping("/{id}")
    public void updateOrder(@PathVariable Long id, @RequestBody Order order) {
        order.setId(id);
        orderService.updateOrder(order);
    }

    @DeleteMapping("/{id}")
    public void deleteOrder(@PathVariable Long id) {
        orderService.deleteOrder(id);
    }
}

③CartController

@RestController
@RequestMapping("/cart")
public class CartController {

    @Autowired
    private CartService cartService;

    @GetMapping("/{userId}")
    public List<CartItem> getCartItemsByUserId(@PathVariable Long userId) {
        return cartService.getCartItemsByUserId(userId);
    }

    @PostMapping
    public void addCartItem(@RequestBody CartItem cartItem) {
        cartService.addCartItem(cartItem);
    }

    @PutMapping("/{id}")
    public void updateCartItem(@PathVariable Long id, @RequestBody CartItem cartItem) {
        cartItem.setId(id);
        cartService.updateCartItem(cartItem);
    }

    @DeleteMapping("/{id}")
    public void deleteCartItem(@PathVariable Long id) {
        cartService.deleteCartItem(id);
    }
}

④InventoryController

@RestController
@RequestMapping("/inventory")
public class InventoryController {

    @Autowired
    private InventoryService inventoryService;

    @GetMapping("/{bookId}")
    public Inventory getInventoryByBookId(@PathVariable Long bookId) {
        return inventoryService.getInventoryByBookId(bookId);
    }

    @PostMapping
    public void addInventory(@RequestBody Inventory inventory) {
        inventoryService.addInventory(inventory);
    }

    @PutMapping("/{id}")
    public void updateInventory(@PathVariable Long id, @RequestBody Inventory inventory) {
        inventory.setId(id);
        inventoryService.updateInventory(inventory);
    }

    @DeleteMapping("/{id}")
    public void deleteInventory(@PathVariable Long id) {
        inventoryService.deleteInventory(id);
    }
}

5 实验结果

①购物车界面

库存界面

订单界面

商品(书籍)界面

http://www.shuangfujiaoyu.com/news/52818.html

相关文章:

  • 更换wordpress后台域名怎么提高seo关键词排名
  • 越秀高端网站建设网站seo推广哪家值得信赖
  • 自己注册个公司做网站怎么样怎么自己注册网站平台了
  • 怎么在网站做系统seo排名哪家有名
  • 网站怎么搜怎么开个人网站
  • 哪个网站有律师做的案件免费网站制作教程
  • ftp给网站做备份百度推广400电话
  • wap网站前台模板网站怎样优化文章关键词
  • 企业信息管理系统免费深圳seo推广公司
  • 海洋生态文明建设的网站名百度浏览器主页网址
  • 给女朋友做网站seo查询排名软件
  • 网站如何做关健词收录软文营销的技巧有哪些
  • 深圳网站设计深圳设计公司个人网页设计作品模板
  • 做网站公司上什么平台广告免费发布信息平台
  • 无锡集团网站建设爱链网买链接
  • 网站建设专业客服接听术语营销策略的重要性
  • mysql进程太多wordpress沈阳网站关键词优化多少钱
  • 网站设计分享百度问答一天能赚100块吗
  • 怎样自己做网站推广石家庄热搜
  • 成都vr 网站开发网络推广内容
  • 常见的网站开发环境百度直播间
  • 常见网页设计超级seo工具
  • 沈阳有名的设计公司有哪些seo怎么推排名
  • html5移动网站制作外链优化
  • 做网站时怎么选择数据库类型市场营销网络
  • 网站建设阿华seo短视频营销成功的案例
  • 做交互设计的网站网站推广的主要方法
  • 可以做水果的团购网站有哪些今日头条新闻大事
  • sql2008做查询网站一个新手如何推销产品
  • 桂林漓江旅游seoul national university