自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 收藏
  • 关注

原创 VUE中格式化日期

需要使用插件:moment– npm 安装(–save表示保存到package.json中)npm install moment --save在package.json中: "dependencies": { "moment": "^2.24.0", "vue": "^2.6.10", },方式一:1 main.js中定义全局变量import moment from 'moment' Vue.prototype.$moment = moment2 组件中的使用

2021-03-02 17:06:56 2172 1

原创 mybatis接口方法给mapper.xml传值的多种形式以及xml的取值方式

来源网络的Mapper接口参数的传递方式说明:使用Mapper接口时参数传递方式Mybatis在使用Mapper接口进行编程时,其实底层是采用了动态代理机制,表面上是调用的Mapper接口,而实际上是通过动态代理调用的SqlSession的对应方法,如selectOne(),有兴趣的朋友可以查看DefaultSqlSession的getMapper()方法实现,其最终会获得一个代理了Mapper接口的MapperProxy对象。MapperProxy对象在调用Mapper接口方法时会把传递的参数做一个转

2021-01-13 15:49:04 2250

原创 vue集成Element组件--使用记录

一、安装及组装暂不考虑二、el语法记录1.el-menu-item标签<template v-for="(tt, key, index) in testItems"> <el-menu-item :index="key" :key="index"> <span slot="title">{{ tt }}</span> </el-men

2020-11-24 18:39:45 1131

原创 idea中设置类和方法的注释模板

1.新建类时,类上直接增加的注释模板File->Settings…->Editor->File and Code Templates->Class#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end#parse("File Header.java")/** * ${NAME} * @Description * @Author hf * @Date ${DAT

2020-11-24 18:36:28 196

原创 使用MyBatisplus的insert方法,报错:Invalid bound statement(not found)

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.jd.fp.mrp.mapper.biz.BizApplicationFormMapper.insertorg.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.jd.fp.mrp.mapper.biz.BizApplicati

2020-11-20 15:57:18 3491

原创 关于for循环中使用try..catch..finally,存在break的执行情况

for (int i = 0; i < 3; i++) { int retry = i + 1; try { // 更新数据 int num = service.updatedata(); System.out.println("invoke execute break....................");

2020-11-13 18:35:09 2804

原创 idea中的项目导入tomcat中的jar包的方法

idea中导入新项目后,发现好多依赖的maven或者jar包没有,跟踪发现这些jar包在tomcat的webapps/WEB-INF/lib下,需要把这些jar导入进来使项目部报错:导入方式如下:1.Filet->Project Structure。。。2.Libraries-> + ->java3.选择具体的jar包位置:4.OK之后,build项目...

2020-11-11 10:55:37 4781

原创 idea社区版没有tomcat,手动安装插件的方法

1.在File->Setting…->Plugins->Smart Tomcat安装2.在Run->Edit Configurations…->Smart Tomcat选择+号定义一个tomcat,选择特定文件夹和名称以及端口号,确定即可!3.右上角显示

2020-11-11 10:12:05 8188 3

原创 使用VSCode下载并启动VUE项目,提交修改到git

1.现在VSCode并安装,并打开2.从git上拉取项目并导入到VSCode中(1)Ctrl+Shift+`或者Ctrl+Alt+T打开终端(2)cd到项目需要保存的文件夹下:如cd D:\software\VSCode file(3)使用get命令拉取项目:get clone https://git.xx.com\xxx.git(4)文件->打开文件夹,选择刚刚下载的项目接口导入到VSCode中。3.配置并启动vue项目(1)在终端中执行:npm install安装npm(2)进入到

2020-11-09 17:33:26 2245

原创 mybatis或者mybatis-plus中save方法返回主键值

1.mapper.xml中:方式:useGeneratedKeys=“true” keyProperty=“id” keyColumn=“id”解释:在xml中定义useGeneratedKeys为true,返回主键id的值,keyColumn和keyProperty分别代表数据库记录主键字段和java对象成员属性名<insert id="saveBill" parameterType="com.jd.fp.mrp.domain.model.biz.AdjustBillInfo"

2020-11-06 16:38:38 15890

原创 Idea中Springboot项目使用JUnit4进行单元测试的方式

依赖注入不可少:<dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope></dependency>1、在业务代码中完成编码操作,如完成service编码实现:/** * 根据审批流程ID获取工服管理数据

2020-10-30 15:24:32 3204

原创 vue.js项目的目录结构

一、vue.js项目的目录结构参考:https://www.runoob.com/vue2/vue-directory-structure.htmlhttps://www.jianshu.com/p/1c83b49d73d8https://www.jianshu.com/p/da79b4b7cdec我们在 IDE(Eclipse、Atom等) 中打开目录,结构如下所示:我们打开 APP.vue 文件,代码如下(解释在注释中):src/APP.vue<!-- 展示模板 -->

2020-10-16 14:51:55 483

原创 Webstorm启动一个vue项目

下载node.js并安装,其中包含了npm参照:https://www.cnblogs.com/aizai846/p/11441693.html在webstorm中配置,scripts中没有dev就选择server没有dev是因为vue的配置中未设置,只有server,build,lint在cmd命令行安装cnpm命令:npm install -g cnpm --registry=https://registry.npm.taobao.org在cmd中执行cnpm命令会提示不..

2020-10-16 11:05:12 3279

原创 vue.js简介及与node.js的关系

一、Vue学习的参考地址:https://www.runoob.com/vue2r/vue-start.html二、Vue.js和node.js的关系:nodejs不是一个js框架,而是一个js运行时环境,类比java中jvm!不管是你是什么操作系统,只要安装对应版本的nodejs,那你就可以用js来开发后台程序。这具有划时代的意义,意味着一直以来只能在浏览器上玩来玩去的js,可以做后端开发了。三、nNpm是什么?cnpm是什么?npm代表npmjs.corg这个网站,这个站点存储了很多的node

2020-10-16 10:56:57 3442

原创 如何把微服务(Springboot)注册到SpringCloud Eureka中

前提是:(1)必须有一个springboot项目存在,作为服务的提供者或者消费者,在这个基础上再进行Eureka注册与发现!(2)必须提供一个Eureka Server服务,并且可以通过类似于http://localhost:8761/访问到Eureka Server服务1.在pom.xml中引入spring cloud依赖,进行版本管理<!-- 引入spring cloud的依赖 --> <dependencyManagement> <dep

2020-07-06 18:23:13 2084

原创 springboot整合RabbitMQ

springboot整合RabbitMQAMQPAMQP(Advanced Message Queuing Protocol,高级消息队列协议)是一个线路层的协议规范,而不是API规范(例如JMS)。由于AMQP 是一个线路层的协议规范,因此它天然就是跨平台的,就像SMTP、HTTP等协议一样,只要开发者按照规范的格式发送数据,任何平台都可以通过AMQP进行消息交互。目前流行的StormMQ、RabbitMQ等都实现了AMQP。RabbitMQRabbitMQ是一个实现了AMQP的开源消息中间件,使

2020-06-09 14:22:29 151

原创 springboot整合WebSocket,实现聊天室功能!

springboot整合WebSocket,实现聊天室功能!一、增加WebSocket依赖<!-- springboot整合WebSocket进行全双工通信(1) --><!-- websocket相关依赖 --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket&lt

2020-05-27 17:51:32 3117 1

原创 springboot整合Shiro安全框架

springboot整合Shiro安全框架,提供身份验证、授权、密码管理、回话管理等!1.引入Shiro依赖并使用Thymeleaf模版技术进行验证:<!-- springboot整合Shiro安全框架,提供身份验证、授权、密码管理、回话管理等(1) --><dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-spring-boot-web-sta

2020-05-25 18:07:21 217

原创 springboot中无法访问static下静态资源的问题,如static/js/jquery.js无法访问的问题

thymeleaf中引入外部JS的方式:(1)在static下新建文件夹放入外部JS文件(2)static下的静态资源访问规则可能受application.properties中spring.mvc.static-path-pattern和spring.resources.static-locations有关!(3)注意(2)中的配置文件不生效时,和MyWebMVCConfig.java中对静态资源的重定位有关系!package com.steno.propertiestest.common;

2020-05-22 10:51:50 7497 2

原创 springboot构建REST服务时报错java.lang.IllegalArgumentException: Id must be assignable to Serializable!: nul

springboot整合Mongodb并构建REST服务,访问提示错误:前端报错:{“cause”:null,“message”:“Id must be assignable to Serializable!: null”}后端报错:java.lang.IllegalArgumentException: Id must be assignable to Serializable!: nulljava.lang.IllegalArgumentException: Id must be assigna

2020-05-21 11:29:33 671

原创 springboot整合Mongodb

springboot整合Mongodb1.增加依赖注意:springboot其实还是整合的spring-data-mongodb,通过spring-data去操作MongoDB数据库<!-- springboot整合Mongodb(1) --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-dat

2020-05-20 19:04:53 768 2

原创 Linux下安装Redis

在linux下:# 下载redis# wget http://download.redis.io/releases/redis-4.0.10.tar.gz# 解压# tar -xzvf redis-4.0.10.tar.gz# cd redis-4.0.10# 编译安装# make MALLOC=libc# make install# 配置Redis# vim redis.conf #Redis默认只允许本地连接,注释后外网就能连接Redis了 #bind 127.0.0.1

2020-05-15 17:06:38 81

原创 springboot整合Redis

使用redis的前提是安装了Redis服务,并正常启动着,可参考:Linux下安装Redis1.配置依赖,并排除data-redis默认使用的lettuce工具,使用jedis作为连接Redis的工具<!-- springboot整合Redis --> <dependency> <groupId>org.springframework.boot</groupId> <artifactI

2020-05-15 17:00:38 174

原创 springboot中@RestController无法识别的问题解决

3.@RestController无法识别的问题解决(1)手动输入后会提示错误,点击Add Maven Dependency…增加maven依赖点击后出现如下图:然后在pom.xml中增加如下代码:<dependencies> <dependency> <groupId>org.springframework.boot<...

2020-05-07 18:44:45 6918

原创 Springboot集成Thymeleaf模版技术

1.springboot集成Thymeleaf模版技术:(1)在application.properties中配置Thymeleaf依赖<!-- springboot整合Thymeleaf视图层模版引擎 --><dependency> <groupId>org.springframework.boot</groupId> &lt...

2020-05-07 18:33:32 108

原创 SSM集成quartz配置定时任务

SSM框架中定时器的了解:使用quartz来配置:准备:导入quartz.jar使用方式:(1)在配置文件中配置bean(2)定义任务josdetails声明执行的类和方法(3)配置调度器trigger,设置调度时间(4)配置主任务调度器scheduler示例:(1)在配置文件中配置bean<bean id="automaticzfkjob" class="com.st...

2020-04-28 18:32:13 244

空空如也

空空如也

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

TA关注的人

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