11 2018 档案

摘要:CMS详解 https://www.cnblogs.com/ggjucheng/p/3977612.html CMS默认不回收Perm, 需要加参数 +CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled gc: cms有个缺点是容易产生内存 阅读全文
posted @ 2018-11-30 19:15 funny_coding 阅读(614) 评论(0) 推荐(0) 编辑
摘要:application.properties 默认 application-xxx.properties 高 systemEnvironment 高 test/main/resources/ 同名文件 @TestPropertySource 优先级更高 jar外部的文件优先级最高 applicati 阅读全文
posted @ 2018-11-28 17:27 funny_coding 阅读(865) 评论(0) 推荐(0) 编辑
摘要:Long超过Integer.max之后,hashCode会和Integer部分重合 String.hashCode() 有很大可能会产生负数 影响分区sharding 阅读全文
posted @ 2018-11-27 20:03 funny_coding 阅读(156) 评论(0) 推荐(0) 编辑
摘要:第一种是继承Thread, 重写了Thread.run() getClass()返回的是匿名类 java.long.Thread$1 第二种是lambda, 重写了Runnable.run() getClass()返回的还是java.long.Thread 阅读全文
posted @ 2018-11-27 19:16 funny_coding 阅读(298) 评论(0) 推荐(0) 编辑
摘要:栈大小? -Xss jinfo -flag ThreadStackSize 帧大小? 和方法中的局部变量,对象个数有关系 栈深度? 方法的进出分别对应一个入栈和出栈 -Xss512k 这个值越大,栈深度max-stacks越大,递归的次数越大, 但是整体支持线程数越小 那么一个线程占用多大的栈内存? 阅读全文
posted @ 2018-11-26 17:16 funny_coding 阅读(3842) 评论(0) 推荐(0) 编辑
摘要:目的: 扫描某个自定义注解标注的类, 或者自定义xml 为这些类生成spring Bean 基本原理:org.springframework.beans.factory.support.DefaultListableBeanFactory#registerBeanDefinition BeanDef 阅读全文
posted @ 2018-11-23 09:28 funny_coding 阅读(1719) 评论(0) 推荐(0) 编辑
摘要:jvm对于类实例的区分 基于完全限定名+classLoader 不同的classLoader可以加载同一class,生成不同实例, 但是这两个class实例生成的对象不能强转 spring boot jar中的lib包如何完全使用自定义的classLoader加载? ==> 在main函数入口, 默 阅读全文
posted @ 2018-11-22 20:47 funny_coding 阅读(694) 评论(0) 推荐(0) 编辑
摘要:https://gooroo.io/GoorooTHINK/Article/17466/Lessons-Learned-Writing-Spring-Boot-Auto-Configurations/29652#.W_ZwdFUzYdV https://blog.csdn.net/isea533/a 阅读全文
posted @ 2018-11-22 17:09 funny_coding 阅读(8828) 评论(0) 推荐(0) 编辑
摘要:一般的, 在windows cmd上启动 utf-8编码的java应用 会有一些字符集问题 可以修改cmd的字符集编码为utf8 , chcp 65001 java -D有空格时 区别: VM参数是-Dxxx的形式写在启动类前面, program arg是写在启动类后面 正确示例: java -Da 阅读全文
posted @ 2018-11-21 11:52 funny_coding 阅读(174) 评论(0) 推荐(0) 编辑
摘要:org.springframework.boot.SpringApplicationBannerPrinter#print(org.springframework.core.env.Environment, java.lang.Class<?>, java.io.PrintStream) 先从env 阅读全文
posted @ 2018-11-20 21:27 funny_coding 阅读(200) 评论(0) 推荐(0) 编辑
摘要:thymeleaf 基本功能是将 th:xxx的内容替换html标签的内容 原标签的内容会被替换掉,原内容只是前端用来显示demo的 和freemarker, velocity的重要区别是,它们的自定义内容是在html标签内, 而th是在html标签的属性上 th:if th:unless条件成立时 阅读全文
posted @ 2018-11-20 18:06 funny_coding 阅读(601) 评论(0) 推荐(0) 编辑
摘要:基于包名的正则表达式,是根据抽象父类的包名过滤,还是实现类的包名过滤, 还是抽象父类实现的接口的包名过滤? org.springframework.aop.aspectj.AspectJExpressionPointcut#matches(java.lang.reflect.Method, java 阅读全文
posted @ 2018-11-19 18:14 funny_coding 阅读(931) 评论(0) 推荐(0) 编辑
摘要:对于只有一个参数的接口类,可以使用e->{} idea会给出快速提示 先写正常的表达式 将虚线处直接删掉, 在原来的方法参数和左大括号之间加上 -> 改造后比原来少了几行, 对于熟手阅读没问题,对于新手理解可能有点别扭 阅读全文
posted @ 2018-11-19 10:19 funny_coding 阅读(168) 评论(0) 推荐(0) 编辑
摘要:系统有两块硬盘, 第一块安装的win7, 第二块安装ubuntu 默认从sda加载grub 如果在bios页面选择从sdb启动,会找不到grub 进入原来的sda系统, grub-install /dev/sdb, 执行之后直接reboot, 选择第二个硬盘就行了. grub会写入到硬盘mbr记录中 阅读全文
posted @ 2018-11-17 11:10 funny_coding 阅读(446) 评论(0) 推荐(0) 编辑
摘要:id出现两次 2018-11-14 16:15:03.833 DEBUG 41432 [ main] c.a.i.o.d.mapper.DatvMapper.insert : ==> Preparing: INSERT INTO dwi_dav_env ( id,gmt_create,gmt_mod 阅读全文
posted @ 2018-11-14 16:17 funny_coding 阅读(1087) 评论(0) 推荐(0) 编辑
摘要:environment是在printBanner之前就初始化好了, 更在context创建之前, 已经加载application-xxxx.properties, System.properties, System.environment ... 也可以自己监听应用启动 SpringApplicat 阅读全文
posted @ 2018-11-12 20:08 funny_coding 阅读(1982) 评论(0) 推荐(0) 编辑
摘要:## spring boot http2 项目已启动的情况下,启动单元测试报端口has binded 可以使用server.port=-1 禁用端口绑定来启动单元测试 https://docs.spring.io/spring-boot/docs/current/reference/html/how 阅读全文
posted @ 2018-11-09 16:59 funny_coding 阅读(657) 评论(0) 推荐(0) 编辑
摘要:直接postman, curl, 浏览器访问后端接口, response header是不会自动加上Access-Control-Allow-Origin的。 需要在ajax中调用,客户端request中会加上Origin请求头 (首先要保证发出的是跨站请求!!!), 服务器端才会加上respons 阅读全文
posted @ 2018-11-06 15:35 funny_coding 阅读(12495) 评论(0) 推荐(1) 编辑
摘要:现象: PVService PVServiceImpl >名称就是PVServiceImpl, 首字母没有小写 PageViewServiceImpl ==>名称是pageViewServiceImpl, 首字母小写 原因:org.springframework.context.annotation 阅读全文
posted @ 2018-11-02 19:07 funny_coding 阅读(1304) 评论(0) 推荐(0) 编辑

build beautiful things, share happiness
点击右上角即可分享
微信分享提示