摘要: import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.Cor 阅读全文
posted @ 2020-03-26 16:27 辰梓悦 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1. 隐藏git stash git pull git stash pop 2.直接commitgit commit -m "one" 阅读全文
posted @ 2020-03-25 19:19 辰梓悦 阅读(882) 评论(0) 推荐(0) 编辑
摘要: 启动MYSQL服务 net start -- 启动 net stop -- 关闭 DISTINCT 去重 DISTINCT SELECT DISTINCT 字段 FROM 表名 + 号的作用(运算符) SELECT 100 + 90; 做加法运算 SELECT '123' + 90; 其中一方为字符 阅读全文
posted @ 2020-03-23 19:01 辰梓悦 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 当表中有text字段的时候 会自动生成WithBLOBS 并且继承实体类 解决方法 重写表字段即可 阅读全文
posted @ 2020-03-21 11:22 辰梓悦 阅读(2015) 评论(0) 推荐(0) 编辑
摘要: 添加serverTimezone=UTC url: jdbc:mysql://localhost:3306/test?serverTimezone=UTC 阅读全文
posted @ 2020-03-21 11:05 辰梓悦 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 观察者模式 当更改一个对象 可能需要更改其它对象 public interface Observer { void send (Object object); } public class Subject { private List<Observer> list = new ArrayList<> 阅读全文
posted @ 2020-03-19 19:55 辰梓悦 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 装饰器模式 不改变原有对象的情况下 给一个对象扩展功能 创建一个接口 // 手机接口 public interface Phone { // 功能 void funcation(); } // 手机类 public class PhoneApp implements Phone { @Overrid 阅读全文
posted @ 2020-03-18 20:05 辰梓悦 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 适配器 使用已有类 但接口与其它代码不兼容时 使用该模式 重用几个子类 但子类缺少一些不能添加到父类中的公共功能时 使用该模式 对象适配器(使用组合) // 手机usb接口 public interface UsbPhone { String getName(); } // 电脑usb接口 publ 阅读全文
posted @ 2020-03-18 18:13 辰梓悦 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 享元模式 共享对象 节省大量内存和CPU资源 public class People { private final String name; private final String sex; public People(String name, String sex) { System.out. 阅读全文
posted @ 2020-03-18 15:49 辰梓悦 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 建造者模式 一般用于不可变对象 比如配置文件 // 创建打印机类 public class Print { // 配置写死了 private final String printName = "1"; private final String printVersion = "2"; private 阅读全文
posted @ 2020-03-18 15:02 辰梓悦 阅读(107) 评论(0) 推荐(0) 编辑