java
mister_you
目之所及,皆是回忆,心之所想,皆是过往,眼之所见,皆是遗憾。
展开
-
java 集成 atlas
java集成atlas原创 2022-06-22 15:30:47 · 657 阅读 · 1 评论 -
idea 切换git地址
idea 切换git地址转载 2022-06-17 11:26:46 · 13776 阅读 · 1 评论 -
java解决数独问题
java解决数独问题原创 2022-06-10 16:49:48 · 362 阅读 · 0 评论 -
递归 阶乘
递归简单示例原创 2022-06-08 09:16:00 · 90 阅读 · 0 评论 -
java 装饰模式 简单示例
public interface DecorateTest { void goTo();}public class DecoratePerson implements DecorateTest{ private DecorateTest decorateTest; public DecoratePerson(DecorateTest decorateTest) { this.decorateTest = decorateTest; } .原创 2022-04-27 14:44:43 · 432 阅读 · 0 评论 -
java 代理模式 简单示例
public interface InterfaceTest { void goToSchool();}public class ProxyStudent implements InterfaceTest { @Override public void goToSchool() { System.out.println("student have breakfast"); new Student().goToSchool(); .原创 2022-04-27 14:17:33 · 404 阅读 · 0 评论 -
java 工厂模式 简单示例
public interface Cut { void cut();}public class Factory { public Cut cut(String type) { if ("director".equals(type)) { return new Director(); } else if ("tony".equals(type)) { return new Tony(); .原创 2022-04-27 13:56:12 · 195 阅读 · 0 评论 -
springboot+mybatis打印sql语句配置
springboot项目配置文件中(ps:application.yaml)配置如下信息:logging: level: '*': debugmybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl原创 2022-04-27 08:53:11 · 807 阅读 · 0 评论 -
Transaction rolled back because it has been marked as rollback-only
此错误原因看代码: @Transactional public void a() { try { b(); } catch (Exception e) { e.printStackTrace(); } //此处执行完毕,默认commit事务 } @Transactional public void b() { int i = 1/0;/原创 2022-04-26 17:07:43 · 505 阅读 · 0 评论 -
线程池ExecutorService submit 返回结果简单示例
1. 先创建自定义ThreadCallBack类,实现Callablepublic class ThreadCallBack implements Callable { private static Callable callable; public static synchronized Callable getInstance(){ if(callable == null){ callable = new ThreadCallBack();原创 2022-04-26 16:45:27 · 1326 阅读 · 0 评论