java
文章平均质量分 66
a863922230
在程序的世界里翱翔,追寻曾经的梦想
展开
-
mariadb 数据库连接使用
mariadb 数据库连接使用 mariadb 数据库连接使用mariadb 数据库连接使用mariadb 数据库连接使用原创 2022-08-27 17:52:56 · 2169 阅读 · 0 评论 -
springboot + mybatis +mysql 5.7 不使用xmlmapper操作
springboot + mybatis +mysql 5.7 不使用xmlmapper操作原创 2022-08-20 17:51:20 · 906 阅读 · 0 评论 -
华视电子web读取身份证信息
首先的是加入要引用的dll文件,放到需要使用的电脑的位置,我的是E:/soft/labor/Termb.dll然后看congtroller层的代码是:import com.exa.dem.entity.CPReadIdCardInfoModel;import com.exa.dem.service.CPReadIdCardInfoService;import org.springframework.beans.factory.annotation.Autowired;import o.原创 2021-07-03 18:05:15 · 1489 阅读 · 2 评论 -
springboot +kafka 配置搭建
springboot 和 kafka搭建要注意几点 1 springboot 的版本和kafka的版本要一致,不然容易导致出错。我这的版本是springboot 2.2.2 kafka的版本是Kafka version: 2.3.1首先安装 zookeeper 和kafka 这里不详细介绍,下面主要写代码:entity 层的代码非常简单就一个User 类,如下:package com.kafka.demoka.entity;public class User { priva..原创 2020-10-20 18:54:30 · 2245 阅读 · 0 评论 -
java和 python的比较 (转载)
作者:知乎用户链接:https://www.zhihu.com/question/23496666/answer/472324546来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。我觉得Python与任何带有“大型”二字的程序,都是相斥的,甚至“中型”都很难触及。只适合用于“小型”项目,且最好无需维护,用完即丢。否则我会尽量避免使用Python。第一次接触Python,到现在也快十年了,按说也算一名老Pythoner,可随着Python越来越火,我对它的关注却.转载 2020-09-17 09:14:44 · 289 阅读 · 0 评论 -
springboot +rabbitmq 整合
好久没有写博客了,现在写一个自己整合rabbitmq 和springboot 相关的例子。rabbitmq的优点,为啥要使用rabbitmq,以及rabbitmq的安装使用这里都不写了,如果不清楚可以自行百度。废话不说下面开始代码@RestControllerpublic class rabbtimqController { @Autowired private AmqpTemplate amqpTemplate; @RequestMapping("/sen.原创 2020-09-06 16:02:45 · 168 阅读 · 0 评论 -
springboot mybatis oracle使用踩的坑
springboot mybatis oracle使用踩的坑单位的一个项目用oralce数据库,我在项目中遇到了两问题,费了一些时间。第一个:整个系统运许正常,没有报错,但是就是不能正确的把数据插入数据库,百思不得其解,要是mysql这的话数据妥妥的都入库了,但是这是oracle那,怎么办,各种找原因,最后发现是的原因是 插入语句最后有个‘;‘,这个在mysql应该是可以正常入库的,但是...原创 2019-12-22 12:09:22 · 403 阅读 · 0 评论 -
git 服务器搭建地址
https://www.cnblogs.com/-mrl/p/11050860.html原创 2019-08-05 00:27:19 · 217 阅读 · 0 评论 -
@ModelAttribute注解的使用总结
@ModelAttribute使用详解@ModelAttribute最主要的作用是将数据添加到模型对象中,用于视图页面展示时使用。@ModelAttribute等价于model.addAttribute("attributeName", abc); 但是根据@ModelAttribute注释的位置不同,和其他注解组合使用,致使含义有所不同。具体区别如下:1.@ModelAttribu...转载 2019-08-14 15:07:19 · 859 阅读 · 0 评论 -
java生成pdf 中文可以显示
java生成pdf的所需的jar包<dependency> <groupId>com.itextpdf</groupId> <artifactId>itextpdf</artifactId> <version>5.5.8</version></dependency>...原创 2019-08-22 13:43:48 · 1631 阅读 · 0 评论 -
springcloud gateway使用
第一首先是pom文件<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-gateway</artifactId></dependency><dependency>...原创 2019-09-27 10:45:56 · 168 阅读 · 0 评论 -
springcloud eureka集群使用
为了防止eureka单机宕机出现问题,保证服务发现的高可用,这里用两个eureka来实现服务发现的高可用.pom文件如下:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/200...原创 2019-09-27 13:49:41 · 133 阅读 · 0 评论 -
springcloud feign 熔断降级
pom 文件<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-openfeign</artifactId></dependency>启动类 注意 要加上@Enable...原创 2019-09-27 15:35:11 · 1302 阅读 · 0 评论 -
Alibaba Sentinel 基础使用
pom文件如下:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven....原创 2019-09-29 10:57:03 · 901 阅读 · 0 评论 -
多个feign调用一个服务
会出现下面的错误:The bean 'xxxx.FeignClientSpecification', defined in null, could not be registered.A bean with that name has already been defined in null and overriding is disabled解决方法:spring: m...原创 2019-06-25 18:08:04 · 2490 阅读 · 0 评论 -
spring 注解aop切入点表达式怎么排除某些方法
@Pointcut("!execution(* aa.bb..*.set*(..)) and execution(* aa.bb..*.*(..)) ")如果是这种形式的法执行了很多其他方法 比如init可以 把 and 换成 && 就可以解决了。@Pointcut("execution(* aa.bb..*.*(..)) and !execution(* aa原创 2017-11-03 09:17:06 · 32260 阅读 · 3 评论 -
win7 安装logstash 的过程,和踩过的坑。
1.安装logstash2.修改logstash 文件夹下Gemfile文件将source改为:https://gems.ruby-china.org3.进入bin目录执行logstash-plugin install logstash-input-jdbc出现如下信息Validating logstash-input-jdbcInstalling logstash-input-jdbcInsta...原创 2018-05-12 19:01:39 · 2613 阅读 · 0 评论 -
关于poi导入数据库数据日期类型出现 5个数字问题
代码如下 if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) { String date3 =""; DateFormat dft = new SimpleDateFormat("yyyy-MM-dd"); if (HSSFDateUtil.isCellDateFormatted(cell)){ ...原创 2019-01-24 11:26:46 · 762 阅读 · 0 评论 -
springboot 的Swagger2不能使用的问题
昨天还好好的可以使用,今天突然就不能使用了,查找原因是因为、在配置文件中加了 #mvc:# static-path-pattern: /static/** # 这样可以找到static下面的所有的文件把这两个去掉,就正常了...原创 2019-01-24 11:30:46 · 1080 阅读 · 1 评论 -
springboot + vue 的post 提交null值 问题解决
跨域的设置如下面代码import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.CorsRegistry;import org.springframework.web.servlet.config.annotatio...原创 2019-01-25 11:51:55 · 3013 阅读 · 0 评论 -
springboot 跨域的四种方式
第一 private CorsConfiguration buildConfig() { CorsConfiguration corsConfiguration = new CorsConfiguration(); corsConfiguration.addAllowedOrigin("*"); corsConfiguration.addAllowedHeader("*"); ...原创 2019-01-20 20:40:09 · 2657 阅读 · 0 评论 -
springboot 2.0 @CrossOrigin 无法跨域的原因
@CrossOrigin(origins ="http://192.168.0.105:8080",maxAge = 3600)@RequestMapping( value = "/index",method = RequestMethod.GET)public String getSuccess(HttpServletResponse response){ return "---...原创 2019-01-22 10:35:23 · 3969 阅读 · 3 评论 -
springboot 导出execl 出现Could not find acceptable representation with root cause 的解决
原来的代码是:response.setContentType("application/vnd.ms-excel;charset=gb2312");解决方法一: 注掉此行代码解决方法二:把上面的代码换成response.setContentType("application/json;charset=gb2312");ok了。 ...原创 2019-02-22 15:03:07 · 5840 阅读 · 3 评论 -
虚拟机联网
https://www.cnblogs.com/linjiaxin/p/6476480.html转载 2019-02-25 20:04:34 · 145 阅读 · 0 评论 -
poi 导出合并execl 的单元格,根据其中的某一列的值合并
int [] field_arr ={0,1,6,7,8,9}; //要合并的数据为那几列for(int m =0;m <field_arr.length;m++){ int field = field_arr[m]; int begin =1; int end =1; int onId =0; int type =0; //根据类型判断的参数 ...原创 2019-03-27 13:30:03 · 580 阅读 · 0 评论 -
linux的svn搭建
转载的地址https://www.cnblogs.com/mymelon/p/5483215.html鉴于在搭建时,参考网上很多资料,网上资料在有用的同时,也坑了很多人本文的目的,也就是想让后继之人在搭建svn服务器时不再犯错,不再被网上漫天的坑爹作品所坑害,故此总结/******开始*********/系统环境:Centos 6.5第一步:通过yum命令安装svnser...转载 2019-04-30 16:16:04 · 116 阅读 · 0 评论 -
zuul 出错的问题
今天自己搭建一个springcloud框架,但是到zuul的时候一直不能执行。直接调用服务可以执行,但是只要一用zuul就页面报错。查找原因了好久终于发现一个问题:spring: application: name: doom-provider1 这里的 name:后面不能使用英文大写字母,只能用小写字母和连接线 - 在这里做个记录...原创 2019-05-24 14:15:53 · 844 阅读 · 0 评论 -
关于java打jar包遇到的问题和解决方法
不多说,先上代码public static void main(String[] args) throws IOException { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationProvider.xml"); context.start(原创 2017-10-13 10:00:18 · 781 阅读 · 0 评论