码迷,mamicode.com
首页 >  
搜索关键字:throws    ( 4120个结果
JavaSE---String
1、概述 1.1、Strings are constant; their values cannot be changed after they are created.(字符串 是 常量,一旦被创建 值 不能被修改); 2、源码解读 public final class String implem ...
分类:编程语言   时间:2020-03-19 10:47:59    阅读次数:69
7.线程的八大核心基础知识之未捕获异常如何处理
一.为什么需要UncaughtExceptionHandler 1.主线程可以轻松发现异常,子线程却不行 运行下面程序发现,子线程出现异常会在控制台显示错误信息而不会终止主线程程序,程序依旧运行很难发现错误信息 public class ExceptionInChildThread implemen ...
分类:编程语言   时间:2020-03-18 20:07:28    阅读次数:69
Netty学习之Demo搭建
如下所示,我们写一个简单的Netty Demo,实现客户端与服务端进行通讯。 1、Netty 服务端启动类 /** * (1)、 初始化用于Acceptor的主"线程池"以及用于I/O工作的从"线程池"; * (2)、 初始化ServerBootstrap实例, 此实例是netty服务端应用开发的入 ...
分类:Web程序   时间:2020-03-18 09:54:44    阅读次数:57
Quartz入门 (二) SimpleTrigger
Trigger 就是触发器的意思,用来指定什么时间开始触发,触发多少次,每隔多久触发一次 SimpleTrigger 可以方便的实现一系列的触发机制。 1.下一个8秒的倍数开始运行: public class SimpleTriggerDemo { public static void main(S ...
分类:其他好文   时间:2020-03-17 21:15:34    阅读次数:74
异步回调
public class CompletableFutureDemo { public static void main(String[] args) throws Exception { //同步,异步,异步回调 //MQ消息中间件 //同步 CompletableFuture<Void> fut ...
分类:其他好文   时间:2020-03-16 23:52:29    阅读次数:59
17 java通过Runtime和Process类调用外部命令
在大型系统中,一个服务去访问另外一个服务或者工具是非常常见的,例如feigin, ribbon, webservice, dubbo甚至jdbc等,这一节我们将看一下如何在java代码中调用外部命令。 关键代码 执行结果 通过Runtime可以执行windows系统中的任何命令,在此写小文记录。 ...
分类:编程语言   时间:2020-03-16 23:51:02    阅读次数:87
SpringSecurity解决跨域问题,在SpringBoot整合SprinSecurity中如何用前后端分离Ajax登录,Ajax登录返回状态200还是近error
先说说SpringSecurity如何实现前后端分离Ajax登录? 今天使用SpringBoot整合SpringSecurity中想使用Ajax替代SpringSecurit的Form表单提交,在这里我们的提交方式还是使用表单提交 http.formLogin().loginProcessingUr ...
分类:编程语言   时间:2020-03-16 19:19:41    阅读次数:86
dubbo源码阅读-Filter默认实现(十二)之ExceptionFilter
@Override public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException { try { //调用 Result result = invoker.invoke(invocation); ...
分类:其他好文   时间:2020-03-16 17:39:50    阅读次数:72
json与对象相互转换
package cn.itcast.test; import cn.itcast.domain.Person; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Test; import java.io.File ...
分类:Web程序   时间:2020-03-16 12:51:02    阅读次数:66
分布式锁
一: 使用redis: @PostMapping("/v1/getLock2") public BaseResponse getLock2(@RequestBody GxyTeacherInfoDto dto) throws Exception{ String key = "product_001" ...
分类:其他好文   时间:2020-03-15 19:05:16    阅读次数:58
4120条   上一页 1 ... 37 38 39 40 41 ... 412 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!