java后台
文章平均质量分 86
天道剑邪
这个作者很懒,什么都没留下…
展开
-
mybatis-plus在springboot框架下由2.1升级到3.4
1、升级pom.xml升级前的依赖:<mybatisplus-spring-boot-starter.version>1.0.5</mybatisplus-spring-boot-starter.version><mybatisplus.version>2.1.4</mybatisplus.version>升级后的版本:<dependency> <groupId>com.baomidou</grou原创 2021-03-26 16:26:50 · 1439 阅读 · 1 评论 -
声网-本地视频录制sdk配置说明
1、服务器准备:Ubuntu 14.04+ x64或者CentOS 6.5+(推荐 7.0)x64Linux 服务器要接入公网,有公网 IP服务器允许访问 qos.agoralab.co,否则 SDK 无法上报必要的统计数据2、sdk准备下载地址:https://docs.agora.io/cn/Recording/downloads,下载后的名称为:Agora_Recording_SDK_for_Linux_v3.0.2.tar,上传到服务器/data/apps路径下/,切记先原创 2020-08-09 17:38:14 · 1507 阅读 · 2 评论 -
idea工具spring boot 集成Junit4
一 安装idea junit4插件1、mac版本 idea点击preferences2、点击右上角install,完成插件安装,重启idea生效。二、项目配置junit2.1 引入junit4依赖<dependency> <groupId>org.springframework</groupId> <ar...原创 2019-01-18 11:09:37 · 995 阅读 · 0 评论 -
创建一个简单的springboot项目,实现restful接口
首先new一个project点击next继续,next继续next继续,点击finish,创建完成点击运行,出现如下结果:这是因为缺少数据库的参数配置导致,继续添加数据库参数配置。application.properties 改为application.yml,可以不改,视个人喜好而定。spring: datasourc...原创 2019-01-18 11:19:03 · 5068 阅读 · 0 评论 -
spring boot 加载出现 Loading class `com.mysql.jdbc.Driver'. This is deprecated.
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class...原创 2019-01-18 17:00:16 · 7546 阅读 · 1 评论 -
swagger与springboot集成
1、引入依赖引入pom.xml依赖,其中swagger.version配置在properties中,<swagger.version>2.8.0</swagger.version>此处贴出部分pom.xml代码<!--添加swagger依赖 start--><dependency> <groupId>io.spr...原创 2019-01-19 10:07:45 · 128 阅读 · 0 评论 -
swagger配置spring boot出现 Unable to infer base url
今天突发奇想,想用@ComponentScan 代替@MapperScan扫描dao试一下,import org.mybatis.spring.annotation.MapperScan;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.Spri...原创 2019-01-19 13:17:11 · 822 阅读 · 0 评论 -
为什么spring boot项目在maven pom.xml中部分依赖没有版本号?或者不用在<properties>中设定值?
1、为什么spring boot项目在maven pom.xml中部分依赖没有版本号?或者不用在<properties>中设定值?而项目却不会报错。现象如图:或者即使写了版本号,却不用在在<properties>中设定值?2、解释:ctrl+鼠标左键点击上图中的版本号,则会进入springboot 的 spring-boot-dependencies...原创 2019-01-19 16:43:00 · 13695 阅读 · 0 评论 -
spring-boot mybatis-plus 集成 + 代码生成器 自定义controller、service、serviceimpl、jsp模板
转自https://blog.csdn.net/qq_33842795/article/details/80227382maven依赖spring boot 和 thymeleaf 结合 controller 返回的控制器路径不能以/ 开头否则运行没问题,发布之后就找不到文件pom.xml部分内容<mybatisplus-spring-boot-starter.ve...原创 2019-01-23 10:09:56 · 3849 阅读 · 0 评论 -
遇到 cannot resolve bean 'serivce'
遇到问题如下所示解决办法:在该service对应的impl的实现类上添加注解@service("agentUserService")原创 2019-01-24 10:15:30 · 7054 阅读 · 1 评论 -
restful访问出现This application has no explicit mapping for /error, so you are seeing this as a fallback
项目中访问测试restful,http://localhost:8080/nes4/test出现如下错误Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.如图解决:发现是springboot 注解未将cont...原创 2019-01-28 10:45:22 · 11607 阅读 · 1 评论 -
mysql大于等于、小于等于的写法
mysql大于等于>=、小于等于<=、>、<的写法大于等于 <![CDATA[ >= ]]>小于等于 <![CDATA[ <= ]]>大于 <![CDATA[ >]]>小于<![CDATA[ < ]]>或者用替换符号进行替换原符号 < <...原创 2019-02-14 10:26:10 · 34341 阅读 · 0 评论 -
expected at least 1 bean which qualifies as autowire candidate for this dependency.
cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'agentPermissionController': Unsatisfied dependency expressed through field ...原创 2019-02-14 14:33:38 · 2049 阅读 · 0 评论 -
ajax访问后台报404,spring mvc框架
在controller中打断点,可以访问,返回的数据也正常。解决办法:找了很久也没发现问题,后来发现未加@RestController注解;又尝试加上@ResponseBody注解,去掉@RestController也可以解决问题;特此记录以纪念这个低级的,但不好找的错误...原创 2019-02-15 14:22:46 · 469 阅读 · 0 评论 -
HttpServletRequest获取URL的方法
示例:当前url:http://localhost:8080/test/test.jsp ?name=xxx1、request.getRequestURL() 返回的是完整的url,包括Http协议,端口号,servlet名字和映射路径,但它不包含请求参数。返回:http://localhost:8080/test/test.jsp2、request.getRequestUR...原创 2019-02-16 11:29:59 · 10006 阅读 · 0 评论 -
spring boot 2.0以上版本 配置https,并且输入http自动转为https
1、生成证书keytool -genkey -alias tomcat -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore keystore.p12 -validity 3650会生成 keystore.p12文件;2、将keystore.p12拷贝到项目的resource下3、在application.xml中添加如...原创 2019-02-26 23:39:49 · 3313 阅读 · 0 评论 -
restful,get请求可以进入cotroller和返回,客户端 出现400的错误,而且接口段也能接收到json数据
报的错误如下:Failed to convert value of type 'java.lang.String' to required type 'int'; nested exception is java.lang.NumberFormatException: For input string: "{"success":true,"error_code":"00000","error_...原创 2019-03-02 13:41:46 · 622 阅读 · 0 评论 -
MetaObjectHandler insertFill未自动插入或者更新公共字段
解决办法,1、在实体类的公共字段上添加注解@TableField(strategy = FieldStrategy.IGNORED)2、在公共字段上添加注解@TableField(value = "create_date", fill = FieldFill.INSERT)或者@TableField(value = "create_date", fill = FieldFill.I...原创 2019-03-08 15:48:55 · 16089 阅读 · 6 评论 -
Base64升级 去掉特殊字符 / % +
1、起因:用的 为java.util.Base64 ,Base64.getEncoder().encodeToString("加密byte字节");如果加密结果用在url中,由于特殊字符/ ,%的出现,会打乱现有的url请求2、解决:为此,需要用方法 getUrlEncoder,来过滤掉这些特殊字符Base64.getUrlEncoder().encodeToString("...原创 2019-04-01 11:25:09 · 11366 阅读 · 0 评论 -
flum conf文件注释
# example.conf: A single-node Flume configuration# Name the components on this agenta1.sources = r1a1.sinks = k1a1.channels = c1# Describe/configure the source# Flume提供了各种source的实现,包括Avro Sour...原创 2019-04-21 23:16:38 · 1183 阅读 · 1 评论 -
MAC 版本 idea 安装阿里代码检查规范插件 详细步骤
1、打开Idea,IntelliJ IDEA->Preferences2、打开如下图示,左侧选择Plugins,右侧搜索输入“Ali”,发现无此插件,继续点击“Browse repositories”3、出现如下图示,搜索框继续搜索“Ali”,发现目标“Alibaba Java Coding Guidelines”, 选中,点击右侧绿标的“Install” 进行插件安...原创 2019-08-21 10:50:05 · 1791 阅读 · 0 评论 -
Mac通过Brew方式安装rabbitmq
1、打开终端terminal任意位置输入命令后回车:brew install rabbitmq安装不用干预,会一直运行到结束。最后两句话很重要2、启动rabbitmq任意位置输入命令:brew services start rabbitmq3、控制台查看进入控制台:http://localhost:15672/用户名和密码:guest,guest进...原创 2019-07-25 16:13:48 · 1173 阅读 · 0 评论 -
debug断点调试中,查看request中的parameter值
request中的parameter的值在debug查看,一直是一件头疼的事情,很多时候宁愿去System.out.println出值,也不愿去一层层的查找今天,本着困难就要被攻克的精神,整理下查找parameter的过程。一般需要打开request的7-9层才可以找到,(下图已经标上序号)打开第7层找到pathParameter,打开第9层找到parameter的值request-&...原创 2019-08-27 17:22:35 · 7310 阅读 · 1 评论 -
spring boot 用Debug模式 启动到一半卡住了 也不报错
用run方式可以启动,部署到服务器上也可以启动,只有debug模式不可以启动最后尝试删除掉所有设置的断点,结果启动成功!悲剧的是上一次,我把整个项目删了,从新git了一下,才好...原创 2019-09-03 19:45:24 · 5311 阅读 · 5 评论