扩展spring-boot自带的logback输出设置
spring-boot-starter-web
依赖了spring-boot-starter-logging
默认是使用logback的实现。
在spring-boot
默认的日志输出设置
在resources
目录下添加logback.xml
内容如下
1 |
|
设置后就可以在代码中使用org.slf4j.Logger
了,日志的输出格式采用spring-boot
默认的格式
spring-boot-starter-web
依赖了spring-boot-starter-logging
默认是使用logback的实现。
在spring-boot
默认的日志输出设置
在resources
目录下添加logback.xml
内容如下
1 | <?xml version="1.0" encoding="UTF-8"?> |
设置后就可以在代码中使用org.slf4j.Logger
了,日志的输出格式采用spring-boot
默认的格式
存入全角的字母,然后用模糊查询 查询不出来..暂时先把全角改为半角…
今天把程序发布到线上环境时,插入数据时mysql直接报错
Cannot execute statement: binlogging impossible since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
百度一番,说问题是因为我程序插入数据时开启了事物
mysql默认的binlog_format是STATEMENT,而在READ COMMITTED或READ UNCOMMITTED隔离级别下,innodb只能使用的binlog_format是ROW。
我程序事物使用的隔离级别默认为READ_COMMINTED
loopback PersistedModel 的方法与rest api对应表
model的方法名 | HTTP Method | restApi url | 说明 |
---|---|---|---|
create |
POST | /Model | |
upsert |
PATCH | /Model | |
upsert |
PUT | /Model | |
exists |
GET | /Model/:id/exists | |
findById |
GET | /Model/:id | 查找对应id的Model |
prototype.updateAttributes |
PATCH | /Model/:id | |
prototype.updateAttributes |
PUT | /Model/:id | |
destroyById /deleteById |
DELETE | /Model/:id | |
exists |
HEAD | /Model/:id | |
find |
GET | /Model | |
findOne |
GET | /Model/findOne | |
count |
GET | /Model/count | |
createChangeStream |
GET | /Model/chage-stream | |
createChangeStream |
POST | /Model/chage-stream | |
replaceById |
POST | /Model/:id/replace | |
replaceOrCreate |
POST | /Model/replaceOrCreate | |
updateAll |
POST | /Model/update | |
upsertWithWhere |
POST | /Model/upsertWithWhere |
关系模型的部分方法与rest api 对应表 更多说明参考 官方文档
model的关联对象的方法名 | HTTP Method | restApi url | 说明 |
---|---|---|---|
__get__attr |
GET | /Model/:id/attr | 查找对应id的Model下的attr数据 |
__create__attr |
POST | /Model/:id/attr | 创建一条对应id的Model下的attr数据 |
__delete__attr |
DELETE | /Model/:id/attr | 删除对应id的Model下的所有attr数据 |
__count__attr |
GET | /Model/:id/attr/count | 查找对应id的Model下的attr数据数量 |
__findById__attr |
GET | /Model/:id/attr/:attrId | 查找对应id的Model下的id为attrId的数据 |
__destroyById__attr |
DELETE | /Model/:id/attr/:attrId | 删除对应id的Model下的id为attrId的数据 |
__updateById__attr |
PUT | /Model/:id/attr/:attrId | 更新对应id的Model下的id为attrId的数据 |
__exists__attr |
HEAD | /Model/:id/attr/rel/:attrId | 检查对应id的Model下的id为attrId的数据(貌似没什么用) |
__link__attr |
PUT | /Model/:id/attr/rel/:attrId | 新增Model与attr的中间数据 (多对多关系) |
__unlink__attr |
DELETE | /Model/:id/attr/rel/:attrId | 删除Model与attr的中间数据 (多对多关系) |
针对NexT.Pisces
修改
theme/next/source/js/src/schemes/pisces.js
1 | $(document).ready(function () { |