2020年6月10日

this.$store.dispatch() 与 this.$store.commit()方法的区别

摘要: commit: 同步操作 this.$store.commit('方法名',值)【存储】 this.$store.state.方法名【取值】 dispatch: 异步操作 this.$store.dispatch('方法名',值)【存储】 this.$store.getters.方法名【取值】 当操 阅读全文

posted @ 2020-06-10 15:45 年夜饭 阅读(7722) 评论(0) 推荐(1) 编辑

2019年10月28日

分页上传多条件查询

摘要: //测试foreach标签 @RequestMapping("/goList") public void testList(int test1 , int test2 , int test3) throws SQLException { //将获取到的OID的值存储到集合中 List<Integer 阅读全文

posted @ 2019-10-28 12:00 年夜饭 阅读(217) 评论(0) 推荐(0) 编辑

跳转登录功能

摘要: // 引入头页面 @RequestMapping("/head") public String head() { return "head.jsp"; } // 退出功能 @RequestMapping("/logout") public String logout(HttpServletRequest req) { ... 阅读全文

posted @ 2019-10-28 11:58 年夜饭 阅读(792) 评论(0) 推荐(0) 编辑

购物车功能

摘要: // 实现添加购物车功能 @RequestMapping("/caraction") public String caraction(HttpServletRequest req) { // 因为可能从不同的位置进入到此servlet,所以我们可以做一些标识,通过标识来执行不同的代码块 String type = req.getParameter("type"); int fid = 0; Str 阅读全文

posted @ 2019-10-28 11:56 年夜饭 阅读(165) 评论(0) 推荐(0) 编辑

详情功能

摘要: // 实现详情功能 @RequestMapping("/detail") public String detail(HttpServletRequest request) { // 既然我们想要显示某个花的详情,所以我们需要获取到当前的花是哪一朵 String fid = request.getParameter("flowerid"); int id = 0; String result = " 阅读全文

posted @ 2019-10-28 11:56 年夜饭 阅读(132) 评论(0) 推荐(0) 编辑

支付功能

摘要: // 支付功能 @RequestMapping(value = "/pay", method = RequestMethod.POST) public String pay(HttpServletRequest req) { // 此处应该实现购物的整个过程 String result = ""; 阅读全文

posted @ 2019-10-28 11:54 年夜饭 阅读(171) 评论(0) 推荐(0) 编辑

结算功能

摘要: // 实现结算功能 @RequestMapping(value = "/checkout", method = RequestMethod.POST) public String checkout(HttpServletRequest request) { // 获取到从购物车里选择想要支付的鲜花的 阅读全文

posted @ 2019-10-28 11:54 年夜饭 阅读(203) 评论(0) 推荐(0) 编辑

ssm与Maven(项目配置文件)

摘要: pom.xml(自动加载jar包) <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:// 阅读全文

posted @ 2019-10-28 11:45 年夜饭 阅读(370) 评论(0) 推荐(0) 编辑

2019年8月16日

(线程池的使用)小练习

只有注册用户登录后才能阅读该文。 阅读全文

posted @ 2019-08-16 08:31 年夜饭 阅读(1) 评论(0) 推荐(0) 编辑

信号量的使用

摘要: 1 package com.ccp.Lc0815; 2 3 import java.util.concurrent.Semaphore; 4 5 public class Test { 6 public static void main(String[] args) { 7 //定义一个信号量对象 8 Semaphore s = new Semaphore(1); 9 //同时启动5个线程 10 阅读全文

posted @ 2019-08-16 08:28 年夜饭 阅读(281) 评论(0) 推荐(0) 编辑

导航