自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(21)
  • 问答 (1)
  • 收藏
  • 关注

转载 解决报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

springboot + mybatis 自动生成 mapper,写接口的时候出现了Invalid bound statement (not found)找了好久发现在yml配置文件中忘了修改路径mybatis: mapper-locations: classpath:mybatis/*.xml configuration: cache-enabled: false这里我修改了resources下mapper.xml文件的路径,但是忘了在yml配置文件中修改,导致出现了错误其余的

2022-04-30 00:30:16 129

原创 spring boot启动时加载静态资源404

在启动spring boot时遇到无法加载index.html我的解决方法:1、检查pom是否有相关依赖: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>2、

2022-04-29 00:00:37 249

转载 springboot整合mybatis时报错Invalid bound statement (not found)

1、如果mapper接口与mapper.xml不在同一级目录下需要在yml或者properties文件下配置mapper.xml文件的路径mybatis: mapper-locations: classpath:mybatis/*.xml configuration: cache-enabled: false2、其他的可以参考这个...

2022-04-07 22:08:31 180

原创 【无标题】

span元素中-webkit-line-clamp不生效

2022-02-21 17:31:20 101

原创 mysql查询指定数据库中指定的表是否存在

适用于在当前数据库中查询另一数据库中的表是否存在,即知道数据库、表名,确定该表是否存在于该数据中表名:tableName数据库:databaseNamesql如下:可以查出表名和数据库名SELECT DISTINCT t.table_name, d.SCHEMA_NAME FROM information_schema.TABLES t, information_schema.SCHEMATA d WHERE t.table_name = 'tableName' AND d.SCHEMA_NAM

2021-12-24 15:25:52 1792 1

原创 mysql查询and和or同时使用

select * from user where id = "2" and (type = "3" or type = "2")

2021-12-17 11:57:01 3259

原创 html中input文本框鼠标悬停提示文本内容,使用onmouseover属性失效

在input中有disabled属性时,onmouseover便会失效,可以使用readonly代替<input class="form-control" type="text" disabled="disabled" onmouseover="this.title=this.value"/><input class="form-control" type="text" readonly onmouseover="this.title=this.value"/>...

2021-12-16 18:12:21 3568 1

原创 2021-11-15获取日期中的特定字段

SimpleDateFormat sdf = new SimpleDateFormat(“yyyy-MM-dd”);Date d = sdf.parse(“2011-10-20”);Calendar c = Calendar.getInstance();c.setTime(d);int year = c.get(Calendar.YEAR);

2021-11-15 17:00:39 169

原创 MySQL删除特定时间前的数据

删除创建时间在12个月以前的数据DELETE FROM test_table WHERE DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 12 MONTH))

2021-11-04 11:53:37 3600

原创 Application Server was not connected before run configuration stop, reason:Unable to ping server1099

先说一下遇到的问题:我的jdk刚从1.8调成了1.7,tomcat版本为8.5.31,打开idea第一次运行项目时,没有问题,在运行一次项目关闭后,再次运行便会出现Application Server was not connected before run configuration stop, reason:Unable to ping server1099想要再次启动需要多试几次(这是个几率问题),或者kil idea的进程。刚开始在网上搜了一下解决办法,但是无用,后来发现把tomcat版本

2021-10-25 10:45:46 291

原创 nvm使用nvm use 版本号乱码问题

exit status 1: ��û���㹻��Ȩ��ִ�д˲�����1、node的安装路径有中文或者空格,在nvm的文件夹内修改setting.txt文件第一行为nvm安装路径,第二行为node安装路径2、另一种情况为权限问题,即使用管理员方式打开cmd窗口。PS:如还有其他情况欢迎补充...

2021-10-19 17:19:56 2754 6

原创 Windows10关闭端口

1、netstat -ano | find “端口号”查出进程号2、taskkill /f /pid 4928命令窗口使用管理员运行,否则可能会因为权限不够出现错误

2021-09-23 09:48:29 322

原创 win10更改专用网络为公用,或者公用为专用

1、win+R输入secpol.msc打开本地安全策略2、打开网络列表管理器策略3、根据需要进行更改

2021-08-23 09:58:07 4944

原创 mybatis-plus关联查询,自定义

创建视图类:import lombok.Data;@Datapublic class UserOrder { private Integer userId; private String userName; private String orderName;}mapper类中自定义:public interface UserMapper extends BaseMapper<User> { @Select("SELECT o.`order_n

2021-08-17 18:16:19 255

原创 mybatis-plus分页查询

配置(mybatsi-plus版本不一样,配置方法也不同,具体可到mybatis-plus官方文档查看) @Bean public MybatisPlusInterceptor mybatisPlusInterceptor() { MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); interceptor.addInnerInterceptor(new PaginationInnerI

2021-08-17 16:51:22 86

原创 mybatis-plus之TableLogic逻辑删除注解

实体类中添加: @TableLogic private Integer isdelete;yml文件中:mybatis-plus: global-config: db-config: #0表示未删除 logic-not-delete-value: 0 #1表示已删除 logic-delete-field: 1

2021-08-16 18:16:40 261

原创 新版mybatis-plus报错Parameter ‘MP_OPTLOCK_VERSION_ORIGINAL‘ not found.

配置mybatis-plus时出错 ‘MP_OPTLOCK_VERSION_ORIGINAL’ not found,下面这个配置是老版本乐观锁配置方法@Bean public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor(){ return new OptimisticLockerInnerInterceptor(); }官方文档给出乐观锁最新配置方法:@Beanpublic My

2021-08-16 10:55:19 1799 1

原创 MyBatis-Plus标签@TableField之fill自动填充

mybatis-plus中TableField映射非主键字段,value映射字段名,exist表示是否为数据库字段,select表示是否查询该字段,fill表示是否自动填充实体类:@Datapublic class User { @TableId(type = IdType.NONE) private Long id; private String userName; private String passWord; @TableField(fill

2021-08-12 18:14:18 1428

原创 Java从数据库获取datetime类型数据,更改输出类型

//从数据库获取信息 List<User> user = userMapper.selectList(null); //将Thu Jun 12 04:00:00 CST 2021格式转化成指定日期格式 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS"); for (User u: user){ Date date = u.getCreatetime.

2021-08-12 16:06:33 719

原创 md5依赖、lombok依赖

<!-- md5依赖--> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId.

2021-08-09 18:01:39 479

转载 2021-07-27

Java中获取的json数据中特定的值点我

2021-07-27 21:54:58 29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除