说明:当前测试为thinkphp5环境下的代码、不考虑用户uid问题,只考虑库存问题 准备: 1. 新建两个表(goods、orders) CREATE TABLE `goods` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(30) NOT ...
分类:
其他好文 时间:
2021-02-23 14:30:21
阅读次数:
0
使用CacheManager 1 Cache 作用 Cache 缓存: 计算机内存中一段数据 作用: 用来减轻DB的访问压力,从而提高系统的查询效率 流程: 2 .使用shiro中默认EhCache实现缓存 (1).引入依赖 <!--引入shiro和ehcache--> <dependency> < ...
分类:
编程语言 时间:
2021-02-23 14:27:13
阅读次数:
0
在我们的日常开发过程中,我们会遇到需要将数据库中的是数据导出到本地的txt文件中,或者将本地TXT文件中的数据导入到数据库。 为了方便开发人员的工作,SQL Server为我们提供了BCP 工具帮助我们导入,导出数据。 如果想使用BCP,需要现在本地安装SQLCMD X64: https://go. ...
分类:
数据库 时间:
2021-02-23 14:21:27
阅读次数:
0
Oracle OCP 19c 认证1Z0-082考试题库(第6题)-CUUG整理 You have been tasked to create a table for a banking application. One of the columns must meet three requirem ...
分类:
数据库 时间:
2021-02-23 14:20:15
阅读次数:
0
pyspark有个bug, 虽然下面代码写了 write.mode("overwrite")但是不生效 spark.conf.set("hive.exec.dynamic.partition.mode", "constrict") db_df.repartition(1).write.mode("o ...
分类:
其他好文 时间:
2021-02-23 14:14:20
阅读次数:
0
1. 简单封装使用 创建一个request组件来定义全局url import axios from 'axios'; export const newVar = axios.create({ baseURL:"http://127.0.0.1:8080", timeout: 5000 }) 切记这里 ...
分类:
移动开发 时间:
2021-02-23 14:10:47
阅读次数:
0
# -*- coding: UTF-8 -*- import pymongo # 连接数据库 client = pymongo.MongoClient('localhost',27017) db=client['qunar'] collection=db['departures'] # 读取数据 d ...
分类:
数据库 时间:
2021-02-23 14:03:33
阅读次数:
0
1.创建超级管理员账户,超级管理员必须在admin下创建,这个超级管理员账户可以访问所有的数据库 use admin db.createUser({ user:'admin', pwd: '123456', roles:[{role:'root', db: 'admin'}] }) 2.修改Mong ...
分类:
数据库 时间:
2021-02-23 14:02:37
阅读次数:
0
sharding: jdbc: config: sharding: tables: myorder: key-generator-column-name: id #主键 actual-data-nodes: db$->{0..1}.myorder_$->{0..1} #分库策略 database‐s ...
分类:
数据库 时间:
2021-02-22 12:45:00
阅读次数:
0
持久化mysql时指定数据库编辑application.properties spring.datasource.platform=mysql db.num=1 db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=u ...
分类:
数据库 时间:
2021-02-22 12:18:17
阅读次数:
0