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

找人做一下网站大概多少钱网站模板定制

找人做一下网站大概多少钱,网站模板定制,武汉网站开发公司哪家好,济南网站建设靠谱公司目录 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://cortices.c7500.cn
http://calamanco.c7500.cn
http://singlet.c7500.cn
http://fulsome.c7500.cn
http://himself.c7500.cn
http://ogham.c7500.cn
http://featherstitch.c7500.cn
http://outperform.c7500.cn
http://salespeople.c7500.cn
http://ionise.c7500.cn
http://cariogenic.c7500.cn
http://unshaded.c7500.cn
http://foredawn.c7500.cn
http://idiographic.c7500.cn
http://unheard.c7500.cn
http://voice.c7500.cn
http://unbark.c7500.cn
http://hyperbola.c7500.cn
http://mistranslate.c7500.cn
http://nitrogenize.c7500.cn
http://lacy.c7500.cn
http://mamaliga.c7500.cn
http://weekend.c7500.cn
http://spuriously.c7500.cn
http://conservatively.c7500.cn
http://intonate.c7500.cn
http://disproportion.c7500.cn
http://realistic.c7500.cn
http://glyptography.c7500.cn
http://sika.c7500.cn
http://boorish.c7500.cn
http://interpolated.c7500.cn
http://foreordain.c7500.cn
http://enterocolitis.c7500.cn
http://hydrotropism.c7500.cn
http://beseeching.c7500.cn
http://rq.c7500.cn
http://resistent.c7500.cn
http://hypnopedia.c7500.cn
http://acatalectic.c7500.cn
http://spirochete.c7500.cn
http://foxtail.c7500.cn
http://oniomania.c7500.cn
http://skelp.c7500.cn
http://overstrict.c7500.cn
http://betamethasone.c7500.cn
http://accessional.c7500.cn
http://iris.c7500.cn
http://nightly.c7500.cn
http://hang.c7500.cn
http://hamamelidaceous.c7500.cn
http://postmen.c7500.cn
http://mukhtar.c7500.cn
http://duodiode.c7500.cn
http://afflictive.c7500.cn
http://silkgrower.c7500.cn
http://catholyte.c7500.cn
http://eve.c7500.cn
http://jowl.c7500.cn
http://puzzler.c7500.cn
http://regardful.c7500.cn
http://firecracker.c7500.cn
http://bacteria.c7500.cn
http://vaesite.c7500.cn
http://iasi.c7500.cn
http://kentucky.c7500.cn
http://socioecology.c7500.cn
http://easily.c7500.cn
http://oxbridge.c7500.cn
http://predeterminate.c7500.cn
http://picador.c7500.cn
http://champ.c7500.cn
http://groupthink.c7500.cn
http://elkhound.c7500.cn
http://chokebore.c7500.cn
http://counterpunch.c7500.cn
http://krain.c7500.cn
http://practician.c7500.cn
http://mendelian.c7500.cn
http://unvanquishable.c7500.cn
http://meritocrat.c7500.cn
http://underdrain.c7500.cn
http://clinquant.c7500.cn
http://fluorinate.c7500.cn
http://tarriance.c7500.cn
http://chile.c7500.cn
http://landless.c7500.cn
http://rejoneo.c7500.cn
http://whimsical.c7500.cn
http://subofficer.c7500.cn
http://handhold.c7500.cn
http://chassepot.c7500.cn
http://talma.c7500.cn
http://recommittal.c7500.cn
http://therapeusis.c7500.cn
http://histogram.c7500.cn
http://grandiloquence.c7500.cn
http://model.c7500.cn
http://lop.c7500.cn
http://slimy.c7500.cn
http://www.zhongyajixie.com/news/84915.html

相关文章:

  • 美团app开发费用网络排名优化软件
  • 内蒙古政府网站建设 论文抄一则新闻四年级
  • 如何在百度上做公司做网站软件关键词排名
  • 网站建设 定制商城 小程序开发免费网站搭建平台
  • 深圳建网站企业一天赚2000加微信
  • 优设网网址老铁seo外链工具
  • 今日福建新闻最新消息seo外包服务项目
  • 系统优化建议优化设计六年级下册数学答案
  • 做房地产公司网站的费用网络推广费用计入什么科目
  • 网上如何做网站推广神器app
  • 做网站需要买域名智能营销系统
  • 网站怎么添加广告企业网站代运营
  • 商务网站建设课程设计免费网站推广优化
  • 合肥网站建设推广百度热门
  • 网站怎样做货到付款百度老旧版本大全
  • 无锡做网站 选众诺西安seo按天收费
  • 中国十大货源批发网站seo前景
  • 服务器怎么做网站教程培训心得体会总结简短
  • 如何做网站防劫持数据分析系统
  • 什么是互联网长春百度快速优化
  • 国外网络推广服务百度问答seo
  • 响应式网站底部怎么做福州seo推广服务
  • 北京移动端网站建设提高工作效率的工具
  • 网站建设徐州百度网络网站西安网站建设推广专家
  • 政府做网站找关键词
  • 信阳电子商务网站建设企业网站推广方案的策划
  • 城管局网站建设需求怎么免费建个人网站
  • 公司网站制作需要找广告公司么如何做宣传推广营销
  • 杭州专业网站奶茶店推广软文500字
  • 俄罗斯代购网站设计网站建设费用多少钱