zno2

上一页 1 2 3 4 5 6 ··· 21 下一页

2023年8月3日 #

git branch test

摘要: 选中历史某个提交节点,reset hard 会直接退回到该节点,并丢弃该节点上面的所有提交记录 阅读全文

posted @ 2023-08-03 19:47 zno2 阅读(7) 评论(0) 推荐(0) 编辑

显示锁,隐式锁 (管程、monitor 、操作系统)

摘要: 无锁时并发出问题 import java.util.*; /** * 无锁 * @author witas * */ public class Bank { public static void main(String[] args) { final int NACCOUNTS = 100; fin 阅读全文

posted @ 2023-08-03 19:47 zno2 阅读(17) 评论(0) 推荐(0) 编辑

MySQL Full-Text Search Functions 文档

摘要: 12.10 Full-Text Search Functions 12.10.1 Natural Language Full-Text Searches12.10.2 Boolean Full-Text Searches12.10.3 Full-Text Searches with Query Ex 阅读全文

posted @ 2023-08-03 19:46 zno2 阅读(97) 评论(0) 推荐(0) 编辑

504 Gateway Time-out

摘要: 现状:nginx 代理某api 接口,业务是统计一年数据,计算量较大,耗时2分钟,导致页面返回 504 http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout Syntax: proxy_read_tim 阅读全文

posted @ 2023-08-03 19:46 zno2 阅读(8) 评论(0) 推荐(0) 编辑

好看的表格

摘要: 参考:https://c.runoob.com/codedemo/3187/ MQ订阅信息(TEST) 业务 TOPIC CONSUMER_GROUP PRODUCER_GROUP 系统消息协议 TEST_TOPIC_IMSYSMSG TEST_CONSUMER_GROUP_IMSYSMSG TES 阅读全文

posted @ 2023-08-03 19:46 zno2 阅读(2) 评论(0) 推荐(0) 编辑

获取 class doc

摘要: 目标识别需要具备的特征:有package,是class,/** ... */ doc文档,只识别单行 public static void main(String[] args) { System.out.println(getClassDoc( "package cn.zno.xxx;\r\n" 阅读全文

posted @ 2023-08-03 19:46 zno2 阅读(9) 评论(0) 推荐(0) 编辑

在线客服网络拓扑

摘要: 阅读全文

posted @ 2023-08-03 19:46 zno2 阅读(4) 评论(0) 推荐(0) 编辑

kube 小工具 java log

摘要: import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.StringReader 阅读全文

posted @ 2023-08-03 19:45 zno2 阅读(7) 评论(0) 推荐(0) 编辑

部门等级控制部门可见度(虚拟根节点)

摘要: 部门等级 1,2,3,... 数字越小等级越高,高等级可以看低等级节点 每个用户有部门等级,且需要等于或高于所在节点部门等级 有且只有一个根节点 11 ,其部门等级是1 ×掉的一枝,第一个节点就是虚拟根节点,这个枝就是该用户可见的组织架构 一条线上的节点的部门等级是逐渐降低的 假设有用户33_1 ( 阅读全文

posted @ 2023-08-03 19:45 zno2 阅读(24) 评论(0) 推荐(0) 编辑

apollo.configService 和 apollo.meta 的区别

摘要: https://www.apolloconfig.com/#/zh/usage/java-sdk-user-guide 1.2.2.2 跳过Apollo Meta Server服务发现 适用于apollo-client 0.11.0及以上版本 一般情况下都建议使用Apollo的Meta Server 阅读全文

posted @ 2023-08-03 19:45 zno2 阅读(703) 评论(0) 推荐(0) 编辑

Apache Rocket MQ 组件 (泛型应用)

摘要: 一、实现 import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.clie 阅读全文

posted @ 2023-08-03 19:45 zno2 阅读(42) 评论(0) 推荐(0) 编辑

初识TCP

摘要: 参考资料: https://www.ietf.org/rfc/rfc9293.html#name-closing-a-connection https://cloud.tencent.com/developer/article/1814881?from=10680 https://docs.orac 阅读全文

posted @ 2023-08-03 19:45 zno2 阅读(4) 评论(0) 推荐(0) 编辑

2023年7月20日 #

freemarker 入门语法

摘要: https://freemarker.apache.org/docs/index.html 程序员开胃菜 https://freemarker.apache.org/docs/pgui.html import java.io.File; import java.io.IOException; imp 阅读全文

posted @ 2023-07-20 16:05 zno2 阅读(36) 评论(0) 推荐(0) 编辑

2023年7月13日 #

SpEL (Spring Expression Language)

摘要: https://docs.spring.io/spring-framework/docs/3.0.x/reference/expressions.html 6.1 Introduction The Spring Expression Language (SpEL for short) is a po 阅读全文

posted @ 2023-07-13 18:02 zno2 阅读(25) 评论(0) 推荐(0) 编辑

@ConfigurationProperties 前缀注入属性

摘要: import java.util.LinkedHashMap; import java.util.Map; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springfra 阅读全文

posted @ 2023-07-13 18:01 zno2 阅读(66) 评论(0) 推荐(0) 编辑

spring test @ContextConfiguration(locations = { "classpath:private-*.xml" }) 不生效

摘要: 查找资料该种写法未被授权,可以增加至少一级目录,或者使用具体名称 classpath:foo/private-*.xml 或者 classpath:private-sss.xml 源码中查到的资料,找到一些蛛丝马迹,但是debug断点时没有调用这个类的方法: org.springframework. 阅读全文

posted @ 2023-07-13 18:01 zno2 阅读(38) 评论(0) 推荐(0) 编辑

spring 静态变量方式加载properties 文件(支持profile)

摘要: foo-test.properties (测试环境) foo-pro.properties (生产环境) 需要根据spring.profiles.active 切换 import java.io.IOException; import java.util.Properties; import org 阅读全文

posted @ 2023-07-13 18:01 zno2 阅读(114) 评论(0) 推荐(0) 编辑

@Configration

摘要: Open Declaration org.springframework.context.annotation.Configuration @Target(value={TYPE}) @Retention(value=RUNTIME) @Documented @Component Indicates 阅读全文

posted @ 2023-07-13 18:01 zno2 阅读(16) 评论(0) 推荐(0) 编辑

Spring 方法命名为啥好多用post ?

摘要: 参考:JLSPreIncrementExpressionPostIncrementExpression int a = 0; a++; // post ++a; // pre 示例: @Test public void test() { int i = 0; System.out.println(i 阅读全文

posted @ 2023-07-13 18:01 zno2 阅读(15) 评论(0) 推荐(0) 编辑

spring bean 的属性为 java.util.Properties 时如何初始化该属性

摘要: public class FooBean { private java.util.Properties attr; public java.util.Properties getAttr() { return attr; } public void setAttr(java.util.Propert 阅读全文

posted @ 2023-07-13 18:00 zno2 阅读(30) 评论(0) 推荐(0) 编辑

spring 如何解析 xml 中的元素

摘要: org.springframework.beans.factory.xml.BeanDefinitionParser 举例说明: <tx:annotation-driven transaction-manager="txManager" /> org.springframework.transact 阅读全文

posted @ 2023-07-13 18:00 zno2 阅读(11) 评论(0) 推荐(0) 编辑

Spring 事务隔离级别

摘要: 其中 DEFAULT 的解释是:Use the default isolation level of the underlying datastore. 意思是不同数据库有其默认的隔离级别,使用对应数据库的默认隔离级别。 Tips: 数据库 默认隔离级别 参考文档 备注 MySQL REPEATAB 阅读全文

posted @ 2023-07-13 18:00 zno2 阅读(31) 评论(0) 推荐(0) 编辑

通过<util:property-path /> 动态配置JedisCluster 节点

摘要: 配置文件(统一命名): # redis cluster redis.node1.host=192.168.1.61 redis.node1.port=7000 redis.node2.host=192.168.1.62 redis.node2.port=7000 redis.node3.host=1 阅读全文

posted @ 2023-07-13 17:59 zno2 阅读(25) 评论(0) 推荐(0) 编辑

Spring 事务不起作用(二)

摘要: 当使用 spring root 和 mvc 时, mvc 一定要分开扫描组件,如果通过mvc 扫描所有组件会导致事务不起作用 一般 servlet 只扫描 web 的 组件,比如 Controller 等 其他组件如 Service 需要由 root 扫描 或者只使用 servlet @Enable 阅读全文

posted @ 2023-07-13 17:58 zno2 阅读(11) 评论(0) 推荐(0) 编辑

Configuration problem: Unable to locate Spring NamespaceHandler for XML schema

摘要: Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring Na 阅读全文

posted @ 2023-07-13 17:57 zno2 阅读(63) 评论(0) 推荐(0) 编辑

BeanFactory 和 FactoryBean 的区别

摘要: 接口 用途 package org.springframework.scripting; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPa 阅读全文

posted @ 2023-07-13 17:55 zno2 阅读(11) 评论(0) 推荐(0) 编辑

2023年6月16日 #

33) Transfer Object pattern

摘要: 类别: 问题: 方案: 示例: package cn.zno; import java.util.ArrayList; import java.util.List; public class TransferObjectPatternDemo { public static void main(St 阅读全文

posted @ 2023-06-16 16:58 zno2 阅读(5) 评论(0) 推荐(0) 编辑

32) service locator design pattern

摘要: 类别: 问题: 方案: 示例: import java.util.ArrayList; import java.util.List; public class ServiceLocatorPatternDemo { public static void main(String[] args) { S 阅读全文

posted @ 2023-06-16 16:57 zno2 阅读(4) 评论(0) 推荐(0) 编辑

31) intercepting filter design pattern

摘要: 类别: 问题: 方案: 示例: import java.util.ArrayList; import java.util.List; public class InterceptingFilterPatternDemo { public static void main(String[] args) 阅读全文

posted @ 2023-06-16 16:57 zno2 阅读(4) 评论(0) 推荐(0) 编辑

30) front controller design pattern

摘要: 类别: 问题: 方案: 示例: public class FrontControllerPatternDemo { public static void main(String[] args) { FrontController frontController = new FrontControll 阅读全文

posted @ 2023-06-16 16:57 zno2 阅读(8) 评论(0) 推荐(0) 编辑

29) Data Access Object Pattern

摘要: 类别: 问题: 方案: 示例: import java.util.ArrayList; import java.util.List; public class DataAccessObjectPattern { public static void main(String[] args) { Stu 阅读全文

posted @ 2023-06-16 16:57 zno2 阅读(7) 评论(0) 推荐(0) 编辑

28) Composite Entity pattern

摘要: 类别: 问题: Core J2EE Patterns - Composite Entity http://www.oracle.com/technetwork/java/compositeentity-141992.html 方案: 示例: public class CompositeEntityp 阅读全文

posted @ 2023-06-16 16:57 zno2 阅读(5) 评论(0) 推荐(0) 编辑

2023年6月9日 #

27) Business Delegate Pattern

摘要: 类别: 问题: 方案: public class BusinessDelegatePatternDemo { public static void main(String[] args) { BusinessDelegate businessDelegate = new BusinessDelega 阅读全文

posted @ 2023-06-09 13:38 zno2 阅读(10) 评论(0) 推荐(0) 编辑

26) MVC Pattern

摘要: 类别: 问题: 方案: 示例: public class MVCPatternDemo { public static void main(String[] args) { // fetch student record based on his roll no from the database 阅读全文

posted @ 2023-06-09 13:37 zno2 阅读(5) 评论(0) 推荐(0) 编辑

25) Visitor pattern

摘要: 类别: Behavior Pattern visit ['vizit] the act of going to see some person or place or thing for a short time 问题: 方案: 示例: public class VisitorPatternDemo 阅读全文

posted @ 2023-06-09 13:37 zno2 阅读(6) 评论(0) 推荐(0) 编辑

24) Template pattern

摘要: 类别: Behavior Pattern 问题: 方案: 示例: public class TemplatePatternDemo { public static void main(String[] args) { Game game = new Cricket(); game.play(); S 阅读全文

posted @ 2023-06-09 13:37 zno2 阅读(4) 评论(0) 推荐(0) 编辑

23) Strategy pattern

摘要: 类别: Behavior Pattern 问题: 方案: 示例: public class StrategyPatternDemo { public static void main(String[] args) { Context context = new Context(new Operati 阅读全文

posted @ 2023-06-09 13:37 zno2 阅读(4) 评论(0) 推荐(0) 编辑

22) Null Object pattern

摘要: 类别: 问题: 方案: 示例: public class NullObjectPatternDemo { public static void main(String[] args) { Animal animal; animal = getAnimal("cat"); animal.makeSou 阅读全文

posted @ 2023-06-09 13:37 zno2 阅读(7) 评论(0) 推荐(0) 编辑

21) State pattern

摘要: 类别: Behavioral Pattern 问题: 方案: 示例: public class StatePatternDemo { public static void main(String[] args) { Context context = new Context(); context.f 阅读全文

posted @ 2023-06-09 13:36 zno2 阅读(7) 评论(0) 推荐(0) 编辑

20) Observer pattern

摘要: 类别: Behavioral Pattern 问题: 方案1: 示例1: import java.util.ArrayList; import java.util.List; public class ObserverPatternDemo { public static void main(Str 阅读全文

posted @ 2023-06-09 13:36 zno2 阅读(11) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 21 下一页

导航