上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
摘要: 对于只有一个参数的接口类,可以使用e->{} idea会给出快速提示 先写正常的表达式 将虚线处直接删掉, 在原来的方法参数和左大括号之间加上 -> 改造后比原来少了几行, 对于熟手阅读没问题,对于新手理解可能有点别扭 阅读全文
posted @ 2018-11-19 10:19 funny_coding 阅读(178) 评论(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 阅读(458) 评论(0) 推荐(0)
摘要: environment是在printBanner之前就初始化好了, 更在context创建之前, 已经加载application-xxxx.properties, System.properties, System.environment ... 也可以自己监听应用启动 SpringApplicat 阅读全文
posted @ 2018-11-12 20:08 funny_coding 阅读(2001) 评论(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 阅读(683) 评论(0) 推荐(0)
摘要: 直接postman, curl, 浏览器访问后端接口, response header是不会自动加上Access-Control-Allow-Origin的。 需要在ajax中调用,客户端request中会加上Origin请求头 (首先要保证发出的是跨站请求!!!), 服务器端才会加上respons 阅读全文
posted @ 2018-11-06 15:35 funny_coding 阅读(12553) 评论(0) 推荐(1)
摘要: 现象: PVService PVServiceImpl >名称就是PVServiceImpl, 首字母没有小写 PageViewServiceImpl ==>名称是pageViewServiceImpl, 首字母小写 原因:org.springframework.context.annotation 阅读全文
posted @ 2018-11-02 19:07 funny_coding 阅读(1337) 评论(0) 推荐(0)
摘要: 为什么要调用方法,而不是直接autowire? 官方文档 https://docs.spring.io/spring-boot/docs/current/reference/html/howto-data-access.html#howto-two-datasources 参考实现 https:// 阅读全文
posted @ 2018-10-31 21:17 funny_coding 阅读(1511) 评论(0) 推荐(0)
摘要: 示例数据库不和bin安装文件在一块, 安装数据库没有这个选项 https://dev.mysql.com/doc/index-other.html 阅读全文
posted @ 2018-10-28 19:00 funny_coding 阅读(359) 评论(0) 推荐(0)
摘要: 默认隔离级别:可重复读 1 原始数据 2 | id | name | addr | 3 | 6 | nick | NULL | 4 5 事务1 事务2 6 7 start transaction start transaction 8 9 select * from t_user where id= 阅读全文
posted @ 2018-10-25 21:42 funny_coding 阅读(266) 评论(0) 推荐(0)
摘要: self define indicator https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#_writing_custom_healthindicators 阅读全文
posted @ 2018-10-24 17:44 funny_coding 阅读(138) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
build beautiful things, share happiness