使用jstack检测Java应用的死锁(deadlock)状态
We can get the concept of deadlock in wikipedia.The picture below gives a common scenario which leads to deadlock.In this blog, I will share how to detect deadlock situation using JDK standard tool js
Java Spring Beans.xml里的Bean定义是如何被解析出来的
ClassPathXmlApplicationContext的构造函数里,一部分逻辑是给各个成员变量赋上初始值:然后是执行refresh操作。获取ConfigurableListableBeanFactory:来自Beans.xml的bean,被解析出来后,就存储在BeanFactory的成员变量beanDefinitionMap里。那么Beans.xml里的bean定义,是如何被解析的呢?进入a
Groovy的本地安装和Eclipse插件的配置
从Groovy的官网下载Development kit:https://groovy.apache.org/download.html下载到本地,解压:把解压后的文件夹路径添加到环境变量里。主要是GROOVY_HOME和Path里加入%GROOVY_HOME%\bin两条记录。如果直接在命令行里输入groovy加上文件名,如果能够成功执行,说明环境变量配置没有问题了。还可以在Eclipse这种ID
build.gradle里repositories的mavenCentral实现原理解析
如果把build.gradle里的mavenCentral改成mavenCentral2会发生什么事?错误消息:Could not find method mavenCentral2() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHa
build.gradle里dependencies标签页的实现原理
build.gradle里的dependencies标签页:如果把dependencies改成dependencies2, gradle build的输出会遇到错误消息:A problem occurred evaluating root project 'quickstart'.Could not find method dependencies2() for arguments
Java JDK目录下的jmap和jhat工具的使用方式
Suppose you have a running Java process and you would like to inspect its running status, for example how many object instance are created or memory consumption status, you can use some standard tool
Java JUnit框架里@Category注解的工作原理
Suppose you have a large number of unit test cases and you don’t want them to be executed all at the same time during Maven build. You can simply achieve it via annotation @Category.(1) Create empty c
使用Java JUnit框架里的@SuiteClasses注解管理测试用例
Suppose you need to repeatedly execute some test method in your unit test case, for example, you would like to test getPrice based on the first set of test data 5 times in test method test1() while fo
使用Java JUnit框架里的@Rule注解的用法举例
Suppose you need to repeatedly execute some test method in your unit test case, for example, you would like to test getPrice based on the first set of test data 5 times in test method test1() while fo
Java注解@Cacheable的工作原理
In order to avoid unnecessary query on database it is a common pattern to define a cache in application layer to cache the query result from database. See one example below. Here the application cache
Spring框架里注解@Autowired的工作原理
Suppose I have a bean named HelloWorld which has a member attribute points to another bean User.With annotation @Autowired, as long as getBean is called in the runtime, the returned HelloWorld instanc
SAP ABAP和Java里的弱引用(WeakReference)和软引用(SoftReference)
Jerry前一篇文章 SAP ABAP一组关键字 IS BOUND, IS NOT INITIAL和IS ASSIGNED的用法辨析 介绍了在ABAP里判断引用变量是否包含了一个有效引用的关键字:IS BOUND.本文则从ABAP和Java编程语言里不同的引用类型这个角度来继续引用这个话题的讨论。不知道大家留意过这个ABAP抽象类CL_ABAP_REFERENCE吗?这个抽象类
一个快速找到Spring框架是在哪里找到XML配置文件并解析Beans定义的小技巧
We can define bean configuration in xml and then can get instantiated bean instance with help of all kinds of containers for example ClassPathXmlApplicationContext as displayed below:The content of Be
使用Java Stream API将List按自定义分组规则转换成Map的一个例子
本文完整测试代码见文末。测试数据是List里的4个员工对象实例:根据员工所在的城市进行分组:结果分成了三组:第一组的员工在上海:第二组的员工在成都:统计每组员工个数:把员工进行分组,得分大于101分的在一组,小于等于101的在另一组:分组结果:package java8;import java.util.ArrayList;import java.util.List;
使用Java代码在SAP Marketing Cloud上创建Contact数据
源代码:package partner1;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.net.URI;import org.apache.http.HttpEntity;import org.apache.http.H
浅谈Java和SAP ABAP的静态代理和动态代理,以及ABAP面向切面编程的尝试
文章目录Java的静态代理静态代理的优缺点ABAP的静态代理Spring AOP的动态代理JDK动态代理的优缺点CGLIB动态代理的优缺点ABAP CGLIB的模拟实现ABAP Pre和Post ExitJerry之前一篇文章 SAP产品增强技术回顾,提到基于Java编程语言实现的SAP Commerce,借助Spring框架的支持,能使用面向切面编程的理念(Aspect Orient
SAP产品增强技术回顾
Jerry最近的工作和SAP某云产品的扩展性设计相关,因此借这个机会,把我过去工作中积累的SAP产品扩展技术相关的知识做一个梳理和回顾。文章目录SAP产品标准SAP Field Extensibility简述SAP Side-by-Side Extensibility简述SAP In-App Extensibility介绍SAP Business Addin增强概念在多种SAP产品中的应用ABAP
一文让您搞清楚@Resources, @Inject和@Autowired的区别
@TOC本文简述这三个Spring应用里常用的注解区别。@Resources官方文档里对@Resources的说明:The @Resource annotation is part of the JSR-250 annotation collection and is packaged with Jakarta EE.什么是JSR-250呢?访问这个链接:https://jcp.org/en/js
json格式的字符串序列化和反序列化的一些高级用法
(1) 仅仅将指定属性对应的值序列化成字符串:var filter = {name: 'Jerry', sex: 'male', age: '10'}; var jsonStr4 = JSON.stringify(filter,
SAP BSP, Java Web Project,Android和微信小程序的初始页面设置
CRM Webclient UIComponent controller的context DO_INIT_CONTEXT:然后是Window controller的DO_INIT_CONTEXT:最后才是view controller的DO_INIT_CONTEXT:Android微信小程序onLoad 生命周期函数--监听页面加载onReady 生命周期函数--监听页面初次渲染完成onShow