E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
loggerfactory
springBoot+restfulApi+注解开发总结(小Demo)(续篇3)
1.打印日志的方法,这个利用到了比较好的打印日志的方式就是导入lombok插件之后,在类的开头加上privatefinalLoggerlogger=
LoggerFactory
.getLogger(当前类名
坚强勇士007
·
2020-08-14 06:59
springboot实战
SpringBoot
Exceptions
oss上传和删除文件
importjava.util.UUID;importorg.apache.commons.lang.StringUtils;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
恰似微尘
·
2020-08-14 02:23
oss
Spring Boot 全局异常捕捉,自定义异常并统一返回
自定义异常处理器**@author问梦杀帝**/@RestControllerAdvicepublicclassExceptionController{privatestaticfinalLoggerlog=
LoggerFactory
.getLogger
weixin_34220623
·
2020-08-14 02:07
SpringBoot 全局异常配置及返回自定义页面
>>>1.全局异常的配置1.创建异常处理类packagecom.test.spring_boot_demo.domain;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
weixin_33676492
·
2020-08-14 02:30
spring boot 404 自定义拦截问题
*/@ControllerAdvicepublicclassExceptionHandle{privatefinalstaticLoggerLOGGER=
LoggerFactory
青尘醉
·
2020-08-13 22:44
spring
boot
小计
JAVA实现微信分享,朋友圈分享
JAVA语言部分publicclassWeinXinUtil{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger(WeinXinUtil.class
sw504
·
2020-08-13 19:51
webSocket通用模板
@ServerEndpoint("/websocket/{userId}")@ComponentpublicclassWebSocketServer{privateLoggerlogger=
LoggerFactory
.getLogger
Xiaoy9
·
2020-08-13 17:46
Java
Java 多字段排序Comparator(兼容Date,Integer,Doubel,Long)
Java反射类:ReflexUtilpublicclassReflexUtil{staticLoggerlogger=
LoggerFactory
.getLogger(ReflexUtil.class);
chkaka
·
2020-08-13 14:06
java基础
对象排序
java基础
springboot-jmx监控
packagecom.yong;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;importorg.springframework.beans.factory.annotation.Value
aftertoday
·
2020-08-13 12:13
java
Java 对象多字段排序 Comparator
html更多文章:http://www.itnose.net/type/1.htmlJava反射类:ReflexUtilpublicclassReflexUtil{staticLoggerlogger=
LoggerFactory
.getLogger
twobrushes
·
2020-08-13 10:53
java
spring boot 实现自定义sessionid并保存Redis
packagecom.uwo.oss.session.configuration;importcom.fasterxml.jackson.annotation.JsonIgnore;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
weixin_34354945
·
2020-08-12 18:23
Spring 之 BeanPostProcessor
publicclassThymeleafSecurityDialectProcessorimplementsBeanPostProcessor{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
woody_me2222
·
2020-08-12 17:04
Spring
使用zookeeeper实现节点监听
since2020-06-17*@seeZookeeperUtils*/publicclassZookeeperUtilextendsZookeeperUtils{privatestaticLoggerlogger=
LoggerFactory
.getLogger
qq_320253624
·
2020-08-12 17:04
zookeeper
记录springboot集成rocketmq关于tag的坑
1.客户端发送代码,此处回调方法里有些业务不用关注,只关心发送方法@ComponentpublicclassRocketMqHelper{Loggerlogger=
LoggerFactory
.getLogger
Z_winyou
·
2020-08-12 17:27
rocketmq
基于 redis setNx 分布式锁实现
publicclassRedisLock{ privatestaticLoggerlogger=
LoggerFactory
.getLogger(RedisLock.class); privatestaticfinalStringLOCK_SUCCESS
lizhne
·
2020-08-12 17:52
RedisLock分布式redis锁
@ComponentpublicclassRedisLock{Loggerlogger=
LoggerFactory
.getLogger(RedisLock.class);privatestaticfinalStringLOCK_SUCCESS
chengchengshuang5716
·
2020-08-12 16:22
数据库
封装JDBC分页查询返回泛型结果集
org.springframework.bootspring-boot-starter-data-jpaorg.springframeworkspring-jdbc4.3.16.RELEASE2、直接上代码packagecn.toroot.bj.core.constant;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
绝爷
·
2020-08-12 00:46
微信公众号(服务号)开发,配置URL响应微信发送的Token验证,接收公众号发送的消息,被动回复消息
Controller控制层/***微信客服公众号controller控制层*/@ControllerpublicclassKeFuController{privatefinalstaticLoggerlog=
LoggerFactory
.getLogger
赵小白的编程日记
·
2020-08-12 00:21
微信开发
Spring参数校验
WebDataBinder只支持Bean类型1.1配置publicclassStudentValidatorimplementsValidator{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
RainSungz
·
2020-08-11 23:32
spring
springboot自定义错误页面
value="error")publicclassBaseErrorControllerimplementsErrorController{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
一个瘦子的梦想
·
2020-08-11 19:46
springboot系列
java将某个文件及其子目录下文件压缩
上代码:importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;
下雨了_简
·
2020-08-11 19:37
java
MongoClient连接数据库
publicclassDbManager{privatestaticvolatileDbManagerinstance;privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
忧伤还是快乐EL
·
2020-08-11 19:00
Java文件生成zip文件
importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;importjava.io.File;importjava.io.FileInputStream
p7+
·
2020-08-11 17:17
java工具
从配置文件里面读取sql并批量执行
publicclassSqlExecutor{privatestaticfinalLoggerlog=
LoggerFactory
.getLogger(SqlExecutor.class);publicstaticvoidmain
jianghuchuan66
·
2020-08-11 17:57
ThreadLocalMap 减少实例化ThreadLocal 对象
java代码实现:packagecom.test.ThreadLocalMap;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;importjava.util.HashMap
shadow_zed
·
2020-08-11 13:23
java
springboot + jpa 常见(不忍直视)问题
整理一下今天的问题:在使用logback时,使用了@slf4j注解,1.privatefinalLoggerlogger=
LoggerFactory
.getLogger(LoggerTest.class
slicing
·
2020-08-11 13:38
java
数据库
spring中如何优雅地给工具类静态字段注入值
publicclassJwtTokenUtil{publicstaticfinalStringCLAIM_KEY_CREATED="created";privatestaticfinalLoggerLOGGER=
LoggerFactory
.getLogg
花落的速度
·
2020-08-11 12:03
spring
java jdbc 简单demo
一个简单的jdbcdemopublicclassSampleJdbcTest{staticLoggerlogger=
LoggerFactory
.getLogger(SampleJdbcTest.class
Tony19900902
·
2020-08-11 11:15
java
Spring aop @args demo 2.0
我做了一个测试:子类@Component("toneModel")publicclassToneModelextendsParentModel{Loggerlogger=
LoggerFactory
.getLogger
Tony19900902
·
2020-08-11 11:15
spring
spring
aop
参数化 ${参数名}
importjava.util.LinkedList;importjava.util.Map;importjava.util.Set;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
五月七日茴香
·
2020-08-11 05:12
捕获接口全局异常,方便前端做错误提示页面
捕获全局异常,方便前端做错误提示页面*/@RestControllerAdvicepublicclassCustomExtHandler{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
yechangfeng47
·
2020-08-11 01:41
spring
boot
MapUtils
importcom.laibo.moudles.exception.GeneralException;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
木夆
·
2020-08-11 00:35
JAVA
EE企业级实战
java异步处理耗时请求
模拟异步调用importcom.springdemo2.service.helloService;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
wangjunjie0817
·
2020-08-10 22:35
java
java统计系统工具类
环比等等,下面是自己整理的常用统计工具类方法importorg.apache.commons.lang.StringUtils;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
ourLang
·
2020-08-10 19:45
java
springboot aop方式打印请求参数与结果(支持POST请求)
@Aspect@Configuration//定义一个切面publicclassLogRecordAspect{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
ice_layer
·
2020-08-10 19:38
Springboot
springboot
Java 对接Jenkins API操作(不需要勾选允许站点跨域访问)
com.offbytwo.jenkinsjenkins-client0.3.8JenkinsUtil不用勾选跨域也可以访问publicclassJenkinsUtils{privatestaticfinalLoggerLOGGER=
LoggerFactory
.getLogger
小白鼠丶
·
2020-08-10 19:23
Jenkins
#
Java基础
统一后端返回格式
统一后端返回格式importcom.alibaba.fastjson.JSON;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;importjava.io.Serializable
sq.zhang_44972575
·
2020-08-10 11:49
java
PayCommonUtil
importorg.jdom.JDOMException;importorg.jdom.input.SAXBuilder;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
饭酱
·
2020-08-10 00:46
java
google本地缓存LoadingCache使用
在项目中语使用本地缓存记录一下,具体代码如下:@ServicepublicclassStrategyLocal{privatestaticfinalLoggerLOG=
LoggerFactory
.getLogger
QH_JAVA
·
2020-08-09 19:55
java
java 最大连续子序列和
importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;/***书上的例子,自己写一遍加深理解*功能:最大连续子序列之和*描述:已知包含n个元素的数组,
wlittlefive
·
2020-08-09 15:43
数据结构
springMVC将request解密,response加密
1.1Filter代码@ComponentpublicclassDecryptFilterextendsOncePerRequestFilter{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
want_water_fish
·
2020-08-09 13:28
java
spring-aop
Spring Boot FeignClient 捕获业务异常信息
搜了个遍也没找到合适的解决方案1.全局异常处理importcom.bossien.common.comm.entity.ResponseDto;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
lucax2039
·
2020-08-09 11:59
spring
cloud
okhttp3.OkHttpClient Get带头部Headers,带参数请求
importjava.util.HashMap;importjava.util.Iterator;importjava.util.Map;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
我写的代码会爆炸
·
2020-08-09 07:57
Java
SpringBoot AOP切面
有兴趣自己去了解一下)这是我目录的具体结构:在aspect文件夹新建HttpAspect文件:@Slf4j注解是lombok包下的,为该类提供日志,效果跟privatestaticfinalLoggerlogger=
LoggerFactory
hewenhaoxiansen
·
2020-08-09 04:31
记一次aop配置错误踩的坑(在一个方法中配置了两个切面,其中一个未起作用)
第一次配置的aop类如下publicclassAopTest1{privatestaticLoggerlog=
LoggerFactory
.getLogger(AopTest1.class);publicvoidbefore
该用户昵称非法
·
2020-08-09 03:42
spring
使用@Async注解创建多线程,自定义线程池
用法AsyncTask.java@ComponentpublicclassAsyncTask{privatestaticfinalLoggerLOG=
LoggerFactory
.getLogger(AsyncTask.clas
weixin_30650039
·
2020-08-08 23:15
java实现图片验证码
可以生成纯数字验证码,也可以生成数字+字母组合验证码,取决于使用哪个构造方法importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;importjavax.imageio.ImageIO
公贵买其鹿
·
2020-08-08 21:41
JAVA
图形验证码
java
数字
sqlserverDBUtil
publicclassDBUtil{protectedstaticfinalLoggerlogger=
LoggerFactory
.getLogger(DBUtil.class);/***数据库连接**@
baobaojilingyi
·
2020-08-08 21:24
springboot实现API /api/{id} 后面跟直接请求的参数id
@RestControllerpublicclassUserControllerextendsAPIController{privatestaticfinalLoggerlogger=
LoggerFactory
.getLogger
super苏然
·
2020-08-08 20:12
springboot
java 利用freemaker 导出 word 文档
*;importorg.slf4j.Logger;importorg.slf4j.
LoggerFactory
;importsun.misc.BASE64Enc
liufeihuwudi
·
2020-08-08 17:37
上一页
11
12
13
14
15
16
17
18
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他