- 浏览: 54983 次
- 性别:
- 来自: 成都
最新评论
文章列表
@Cacheable(value = {"userLogs"}, keyGenerator = "cacheKeyGenerator" )
package com.opencloud.common.configuration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.cache.interceptor.SimpleKey;
...
删除C:\Users\账号\store 文件夹内容,然后重新启动。
我的路径是C:\Users\pingoit\store
创建字体目录
mkdir /usr/share/fonts/win_fonts/
复制windows上传的字体到目录
cp *.ttf /usr/share/fonts/win_fonts/; cp *.TTF /usr/share/fonts/win_fonts/ cp *.otf /usr/share/fonts/win_fonts/ cp simsun.ttc /usr/share/fonts/win_fonts/
跳转到字体文件夹
cd /usr/share/fonts/win_fonts/
然后执行安装字体命令
fc-cache -fv
查看Linux目前的所有中文字体
fc-lis ...
//安装Nginx
docker pull nginx
// 启动Nginx
sudo docker run -d -p 80:80 nginx
// c18d9da73a2d --CONTAINER ID(容器ID)
sudo docker exec -it c18d9da73a2d bash
// 在 myNginx/nginx目录下创建
sudo mkdir -p /myNginx/nginx/{conf,conf.d,html,logs}
//复制配置文件
// 复制到 /myNginx/nginx/conf/nginx.conf
sudo docker ...
docker run -d -p 10086:8080 --name my-tomcat -v /myTomcat/webapps/ROOT:/usr/local/tomcat/webapps/ROOT tomcat:9.0.8-jre10
说明:
// tomcat:9.0.8-jre10 --tomcat容器
// /myTomcat/webapps/ROOT -- 挂载路径
// 10068 外部端口
// 8080 映射端口
// -v /myTomcat/webapps/ROOT:/usr/local/tomcat/webapps/ROOT tomcat下的ROOT映射到/myTo ...
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
i ...
## maven配置
<!-- PDF-->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13.1</version>
</dependency>
##导出工具类
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.*;
import org.apache.comm ...
@Data
@ApiModel
public class AddUserForm {
@NotBlank(message = "请填写身份证")
@IDCard
@ApiModelProperty(value = "身份证",required = true)
private String idCard;
@NotBlank(message = "请填写本人手机号")
@Phone
@Length(max = 11, min = 11,m ...
级联校验的关键 在list上加 @Valid 在需要校验的list对象加 @Validated
——————————————————————————————————————
@Validated和@Valid的区别:
1、@Valid:标准JSR-303规范的标记型注解,用来标记验证属性和方法返回值,进行级联和递归校验
2、@Validated:Spring的注解,是标准JSR-303的一个变种(补充),提供了一个分组功能,可以在入参验证时,根据不同的分组采用不同的验证机制
3、在Controller中校验方法参数时,使用@Valid和@Validated并无特殊差异(若 ...
错误:
> 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'taskinst.ID_' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
执行以下sql 即可
SET GLOBAL sql_mode ='STRICT_TRANS_T ...
先讲解以下几个关键点
表单校验的关键在于注解:@Validated
分组校验的关键在于 @Validated({UpdateGroup.User.class}) 校验规则有定义UpdateGroup.User.class 就会启用该校验规则
UpdateGroup 可以自行定义
表单校验信息捕获当然就是handleMethodArgumentNotValidException 中的代码来处理了 这里可以根据实际情况就行修改
Swagger的两个关键注解 @Api @ApiOperation
废话不多说 直接上代码
//表单校验 抛出异常信息
@RestControllerAdv ...
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'ccms1.act_ge_property' doesn't exist
### The error may exist in org/activiti/db/mapping/entity/Property.xml
### The error may involve org.activiti.engine.impl.persistence. ...
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=6Ig6mec2CoTQqMxMGZpRXajW"></script>
<script>
$(document).ready(function(){
//内容切换
$(".tablet li").click(function(){
var idx = $(this).index();
$(this).addClass(&quo ...
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder.getLanguageDriver(MybatisMapperAnnotationBuilder.java:369)
The following method did not exist:
...
public static void main(String[] args) {
String a="An