MP条件构造器

2023-03-16 | MybatisPlus

条件构造器

具体见官网文档:

条件构造器

以下是常用的基本操作:

阅读全文

MybatisPlus配置项

2023-03-16 | MybatisPlus

常用的MybatisPlus配置项

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 指定全局的配置文件
mybatis-plus.config-location=classpath:mybatis-config.xml

# 指定Mapper.xml文件的路径
mybatis-plus.mapper-locations = classpath*:mybatis/*.xml

# 实体对象的扫描包
mybatis-plus.type-aliases-package = cn.itcast.mp.pojo

# 禁用自定的驼峰映射
#mybatis-plus.configuration.map-underscore-to-camel-case=true

# 禁用缓存
#mybatis-plus.configuration.cache-enabled=false

# 全局的id生成策略
#mybatis-plus.global-config.db-config.id-type=input
mybatis-plus.global-config.db-config.id-type=auto

# 全局的表名的前缀
mybatis-plus.global-config.db-config.table-prefix=tb_

# 删除状态的值为:1
mybatis-plus.global-config.db-config.logic-delete-value=1

# 未删除状态的值为:0
mybatis-plus.global-config.db-config.logic-not-delete-value=0

# 枚举包扫描
mybatis-plus.type-enums-package=cn.itcast.mp.enums

阅读全文

MybatisPlus的CRUD操作

2023-03-15 | MybatisPlus

在继承MP的BaseMapper后已经有了基本的操作:

fwB86.png

返回值为int,指受影响的数据条数。

阅读全文

MybatisPlus的整合

2023-03-14 | MybatisPlus

具体实现Spring Springboot与MP的整合

一、Spring + Mybatis + mp实现

jdbc.properties jdbc配置

1
2
3
4
jdbc.driver=com.mysql.jdbc.Driver  
jdbc.url=jdbc:mysql://127.0.0.1:3306/mp?useUnicode=true&characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false
jdbc.username=root
jdbc.password=root

阅读全文

SpringBoot自动装配

2023-03-13 | SpringBoot

SpringBoot自动装配原理

通过Condition、enable、import等注解实现自动装配

阅读全文

Apache2解决authorization跨域问题

2020-08-23 | Apache

问题描述:前端在请求头中发送的Authorization字段消失不见,报跨域错误而跨域配置无误

环境:
系统:Ubuntu18.04
版本:Apache2.4 python3.6

阅读全文

Apache2部署flask

2020-08-23 | Apache

环境:
系统:Ubuntu18.04
版本:Apache2.4 python3.6

阅读全文

解决Flask+Apache2邮箱前端验证问题

2020-07-29 | flask

在apache上配置flask时可能出现如图所示的email-validator模块丢失问题


amMFmj.png

阅读全文

Apache2解决中文编码问题

2020-07-29 | Apache

  1. 修改 /usr/lib/python2.7/ 下的 site.py 文件

    1
    $ sudo vim /usr/lib/python2.7/site.py

阅读全文

Ubuntu安装Tensorflow-gpu

2020-03-22 | Tensorflow

环境:
系统:Ubuntu18.04
GPU:GTXm1050ti
显卡驱动:440
CUDA:10.1
Cudnn:7.6.5
Tensorflow-gpu:2.1.0

Tensorflow官网:https://tensorflow.google.cn/

阅读全文