7.01

dubbo-admin的master分支之前不是打包失败嘛,但能正常运行emmm我今天换成dubbo-admin的develop分支,改了server.port为7001,打包成功,点进去浏览器也能看,而且好好看q(≧▽≦q)
image.png
实现provider-server测试时首先就因为启动顺序报错,纠正为先启动zookeeper,然后启动dubbo-admin,最后启动Springboot项目provider-server ,将微服务提交到注册中心。
image.png
image.png
依然报错,哼(¬︿̫̿¬☆)一行一行的看image.png

  1. Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2. 2021-07-01 15:25:52.019 ERROR 6476 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
  3. ***************************
  4. APPLICATION FAILED TO START
  5. ***************************
  6. Description:
  7. An attempt was made to call a method that does not exist. The attempt was made from the following location:
  8. org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.addTargetDataListener(CuratorZookeeperClient.java:294)
  9. The following method did not exist:
  10. 'org.apache.curator.framework.listen.ListenerContainer org.apache.curator.framework.recipes.cache.NodeCache.getListenable()'
  11. The method's class, org.apache.curator.framework.recipes.cache.NodeCache, is available from the following locations:
  12. jar:file:/D:/ShageProgram/apache-maven-3.8.1/maven-repo/org/apache/curator/curator-recipes/5.1.0/curator-recipes-5.1.0.jar!/org/apache/curator/framework/recipes/cache/NodeCache.class
  13. The class hierarchy was loaded from the following locations:
  14. org.apache.curator.framework.recipes.cache.NodeCache: file:/D:/ShageProgram/apache-maven-3.8.1/maven-repo/org/apache/curator/curator-recipes/5.1.0/curator-recipes-5.1.0.jar
  15. Action:
  16. Correct the classpath of your application so that it contains a single, compatible version of org.apache.curator.framework.recipes.cache.NodeCache

第一行,ApplicationContext(这是Spring Framework的那个Spring Context)启动出现错误。要显示情况报告,请在启用“debug”的情况下重新运行应用程序。这个没什么用,丢了。Cache_-2e7c70885df0b2c1.jpg
2021-07-01 15:25:52.019 ERROR 6476 —- [ main] o.s.b.d.LoggingFailureAnalysisReporter : 异常放的太大了,正常人也不知道错报到哪去—<-<-<@
试图调用不存在的方法。尝试是从以下位置进行的: org.apache.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.addTargetDataListener(CuratorZookeeperClient.java:294) ,嗯,还行,看看日志下面说了什么( ̄ε(# ̄)
等等,我点进去看看这个报错位置,dubbo-3.0.0.jar?????image.png
我突然想起来Dubbo-admin的Issue页好像提过这个,去看看先(。。)
image.png
今年5月的这个issue还open着,再看看源码什么时候更新的(#°Д°)
image.png
5个月前更新的,那看来是用不了dubbo-admin来进行可视化管理zookeeper注册中心了。∑( 口 ||那不用dubbo-admin也启动不了啊,接着看报错日志。ε=ε=ε=(~ ̄▽ ̄)~
以下方法不存在:’org.apache.curator.framework.listen.ListenerContainer org.apache.curator.framework.recipes.cache.NodeCache.getListenable()’
方法的类,org.apache.curator.framework.recipes.cache.NodeCache,可从以下地点获得:jar:file:/D:/ShageProgram/apache-maven-3.8.1/maven-repo/org/apache/curator/curator-recipes/5.1.0/curator-recipes-5.1.0.jar!/org/apache/curator/framework/recipes/cache/NodeCache.class
大概是导错包?老师能导成功啊,又是谁更新搞出的问题🐱‍🚀🐱‍🚀🐱‍🚀![Cache
-3e2b1bc27524af6f.jpg](https://cdn.nlark.com/yuque/0/2021/jpeg/2317523/1625743485124-d2b866f0-eeb4-4b98-b5b1-773fd90e8ca2.jpeg#height=54&id=u14c28142&margin=%5Bobject%20Object%5D&name=Cache_-3e2b1bc27524af6f.jpg&originHeight=155&originWidth=198&originalType=binary&ratio=1&size=3109&status=done&style=none&width=69)
类的层次结构是从以下位置加载的:org.apache.curator.framework.recipes.cache.NodeCache: file:/D:/ShageProgram/apache-maven-3.8.1/maven-repo/org/apache/curator/curator-recipes/5.1.0/curator-recipes-5.1.0.jar
可能版本是新了一点,但这也是去年的老东西了。(ノω<。)ノ))☆.。image.png
行动:修改应用程序的类路径,使其包含单个兼容版本org.apache.curator.framework.recipes.cache.NodeCache

  1. 2021-07-01 15:25:52.149 INFO 6476 --- [ main] f.a.ReferenceAnnotationBeanPostProcessor : class org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
  2. Process finished with exit code 1
  1. org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor被摧毁,Cheeeeeeen!(被凉x5敲晕)<br />我想想怎么解决。灵机一动,把Dubbo的版本降到2.7.12Hi~ o(* ̄▽ ̄*)ブ然后报同一个错误,害,反正不是Dubbo版本的问题,换回3.0.0先(。>︿<)_θ<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625126999414-43b87470-062d-4f25-ad99-8594f035eea6.png#height=476&id=u22e18183&margin=%5Bobject%20Object%5D&name=image.png&originHeight=952&originWidth=1920&originalType=binary&ratio=1&size=210838&status=done&style=none&width=960)<br />让我进Dubbo的Issue页看看发育正不正常🐱‍🏍好像没提什么东西耶( •̀ ω •́ )y<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625128014756-bada4906-939f-47ef-8a99-22a22f21ba7e.png#height=450&id=u3736364f&margin=%5Bobject%20Object%5D&name=image.png&originHeight=900&originWidth=1865&originalType=binary&ratio=1&size=139703&status=done&style=none&width=932.5)<br />瞄准一个旧包,好像见过一个不同groupid的jar包,这个最近一次更新是在2011,太老了。![Cache_151248aed31d6c85.jpg](https://cdn.nlark.com/yuque/0/2021/jpeg/2317523/1625743508130-46ad718a-8c17-431b-b50d-e50a14177dde.jpeg#height=79&id=uf606fb05&margin=%5Bobject%20Object%5D&name=Cache_151248aed31d6c85.jpg&originHeight=572&originWidth=572&originalType=binary&ratio=1&size=62709&status=done&style=none&width=79)
  1. <!-- https://mvnrepository.com/artifact/com.github.sgroschupf/zkclient -->
  2. <dependency>
  3. <groupId>com.github.sgroschupf</groupId>
  4. <artifactId>zkclient</artifactId>
  5. <version>0.1</version>
  6. </dependency>
  1. 也不知道怎么改,害🐱‍🐉🐱‍🐉🐱‍🐉🐱‍🐉DubboGithub主页有个没用过的包叫Dubbo Dependencies ZooKeeper,看看他的依赖版本,把curator-frameworkcurator-recipes都从5.1.0降到4.0.1👀👀还是报错━━( ̄ー ̄*|||━━<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625128982708-b9e4b148-dc3f-4991-a168-0bd22a1550d7.png#height=516&id=u1bc80ed0&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1031&originWidth=1920&originalType=binary&ratio=1&size=199318&status=done&style=none&width=960)<br />算了,改成跟老师一样的版本,就zookeeper保留3.7.0,谁怕谁<( ̄ c ̄)y▂ξ还是启动失败555<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625129189826-a0baa9a6-ab6d-4282-a502-02635c9a04ec.png#height=516&id=u11f30473&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1032&originWidth=1920&originalType=binary&ratio=1&size=226473&status=done&style=none&width=960)<br />搁置了直接解决,我太难了(+_+)?去看看Dubbo官方的案例~%?…,# *'☆&℃$︿★?<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625130293234-b0c187c8-c666-4e31-9552-dd3064d29d59.png#height=318&id=u3234f869&margin=%5Bobject%20Object%5D&name=image.png&originHeight=636&originWidth=1228&originalType=binary&ratio=1&size=66073&status=done&style=none&width=614)<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625130794003-09860a9e-37fa-4251-9b73-3da0908e191d.png#height=514&id=ue584b9ef&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1027&originWidth=1920&originalType=binary&ratio=1&size=231475&status=done&style=none&width=960)<br />今天晚上替换curator-framework和curator-recipes的版本为4.3.0,噢噢噢噢噢!( ̄▽ ̄)"<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625148644383-ffff1f30-1f81-4f3b-9bda-0dc35898a69e.png#height=511&id=u39b13826&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1022&originWidth=1920&originalType=binary&ratio=1&size=260224&status=done&style=none&width=960)<br />分享一下对应的依赖版本,解决了(dubbo先没敢升3.0.0,因为我要测试dubbo-admin)( •̀ ω •́ )✧
  1. <!-- https://mvnrepository.com/artifact/org.apache.dubbo/dubbo-spring-boot-starter -->
  2. <dependency>
  3. <groupId>org.apache.dubbo</groupId>
  4. <artifactId>dubbo-spring-boot-starter</artifactId>
  5. <version>2.7.12</version>
  6. </dependency>
  7. <!-- https://mvnrepository.com/artifact/com.github.sgroschupf/zkclient -->
  8. <dependency>
  9. <groupId>com.github.sgroschupf</groupId>
  10. <artifactId>zkclient</artifactId>
  11. <version>0.1</version>
  12. </dependency>
  13. <!-- 引入zookeeper -->
  14. <dependency>
  15. <groupId>org.apache.curator</groupId>
  16. <artifactId>curator-framework</artifactId>
  17. <version>4.3.0</version>
  18. </dependency>
  19. <dependency>
  20. <groupId>org.apache.curator</groupId>
  21. <artifactId>curator-recipes</artifactId>
  22. <version>4.3.0</version>
  23. </dependency>
  24. <dependency>
  25. <groupId>org.apache.zookeeper</groupId>
  26. <artifactId>zookeeper</artifactId>
  27. <version>3.7.0</version>
  28. <!--排除这个slf4j-log4j12-->
  29. <exclusions>
  30. <exclusion>
  31. <groupId>org.slf4j</groupId>
  32. <artifactId>slf4j-log4j12</artifactId>
  33. </exclusion>
  34. </exclusions>
  35. </dependency>
  36. <dependency>
  37. <groupId>org.springframework.boot</groupId>
  38. <artifactId>spring-boot-starter-web</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.springframework.boot</groupId>
  42. <artifactId>spring-boot-starter-test</artifactId>
  43. <scope>test</scope>
  44. </dependency>
  1. 成功查到注册进来的服务了,好耶<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625149073638-2b6c97ad-6729-4f26-b67c-c3b4e353604c.png#height=318&id=udee3faa7&margin=%5Bobject%20Object%5D&name=image.png&originHeight=635&originWidth=1222&originalType=binary&ratio=1&size=155332&status=done&style=none&width=611)<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625149091132-7f0ab74e-6f17-48dd-bf2e-792756865356.png#height=318&id=u8ec273e5&margin=%5Bobject%20Object%5D&name=image.png&originHeight=635&originWidth=1220&originalType=binary&ratio=1&size=134365&status=done&style=none&width=610)<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625149046711-3d9fe831-9768-4944-82cd-8216a36a1501.png#height=514&id=u64db1264&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1027&originWidth=1920&originalType=binary&ratio=1&size=117139&status=done&style=none&width=960)<br />顺便提提@DubboService和@DubboReference这两个注解,之前的dubbo的注解@Service因为容易和Spring的注解@Service搞混,官方把这两个注解给@Deprecated掉了,换成@DubboService和@DubboReference。<br />![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625149184941-dfcbd03a-72c3-408c-9bfa-2798cef097d2.png#height=517&id=u0b891101&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1033&originWidth=1920&originalType=binary&ratio=1&size=265430&status=done&style=none&width=960)<br />在测试类里写个消费者,也成功,解决了,溜。🤳![image.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1625150578303-eb2b8da8-21a9-4ea5-b641-5e2ba0eb4160.png#height=516&id=u957588ca&margin=%5Bobject%20Object%5D&name=image.png&originHeight=1032&originWidth=1920&originalType=binary&ratio=1&size=253296&status=done&style=none&width=960)<br />后续尝试把dubbo-spring-boot-starter从2.7.12改为3.0.0,provider启动失败了,唉( ̄m ̄)把curator-framework和curator-recipes的版本从4.3.0提到5.0.0(我还没提到5.1.0呢),也失败了,先这样吧(・∀・(・∀・(・∀・*)

7.02

根据报错,引入curator-x-discovery4.3.0,解决了dubbo-spring-boot-starter3.0.0的报错问题,成功启动,而且dubbo-admin能正常扫描到测试Provider,而Consumer也能正常测试,目前就剩apache curator版本卡在4.3.0这个问题了(因为我把zookeeper当Registry用,自然没有元数据信息)ԅ(¯﹃¯ԅ)
image.png
image.png
image.png
image.png
image.png
对于那个奇怪的zkclinet0.1,原来是Dubbo官方文档指定过,怪不得https://dubbo.apache.org/zh/docs/v3.0/references/configuration/references/registry/zookeeper/#fn:1image.png
但官方文档没提curator-x-discovery,太怪了

  1. <!-- https://mvnrepository.com/artifact/org.apache.curator/curator-x-discovery -->
  2. <dependency>
  3. <groupId>org.apache.curator</groupId>
  4. <artifactId>curator-x-discovery</artifactId>
  5. <version>4.3.0</version>
  6. </dependency>

在Github上提的第一个Open Issue,希望有人Ping我(°°)~
image.png
每次看到Gitee上这个违规内容就出戏( ̄y▽, ̄)╭
image.png
好像之前没提过清华化协人的二次元情结( ̄﹃ ̄)
image.png

7.03

倒教起我做茴的四种写法了◑﹏◐
(想了想,把之前和人聊JUC得图删了)
说起来,中间一步是为什么与f’x(x0,y0)和f’y(x0,y0)差一个无穷小量呢? 这下无事了
image.png
易语言怎么还没挂,还把我的Rust挤下去增速最快的了🤦‍♂️Dart这种因政治正确而生的语言能不能爬啊🐱‍🐉
image.png
隐函数存在的微分法则和方程组确定隐函数的存在准则(在微积分(三)第五讲隐函数存在定理)的第一部分的第二点为何偏导需要存在且连续,需要挪用那本数学分析来证明。Cache_-6e2675f4f7b6451c.jpg
image.png
第七讲二元函数的极值,多元函数的Taylor公式,没细谈数学归纳法那一步,建议自行尝试。本身Taylor公式是为了证明二元函数的极值判定定理时用的,非数学系只需了解(老师之言啊)

7.04

e对x积分,怎么会是e呢?
image.png
今天的课程讨论区就蚌到这里了(@_@;)
image.png
微积分(四)第一讲,P的法向,这个词出现的莫名其妙的?(ps:我的问题)image.png

7.05

警告:发现机械波的驻波一节之前没学。
备案,1GHz=10^3MHz=10^6K=10^9KHz=10^12Hz,1m=10^9nm

7.06

没有驻波,唔,现在打开资料看看吧,刚好复习题(2)的选择题第6题提到
image.png
没提供什么信息,强记了,两个相邻波腹之间各点的相位相同,这句话是错的。两个相邻波节之间各点的相位相同,这句话是对的。
复习题(2)的选择题第10题,对比了一下资料的公式解法和标准答案,我蚌埠住了。
image.png
image.pngimage.png
这学期干的好多重活都是在虚拟机里干的,因为怕破解版的工业级软件有病毒。现在终于可以重置这台windows虚拟机了,实验室这边好像师兄请来来了指导Linux运维的老师,不过不知道在哪(
image.png

7.08

windows11是win10的手机系统。逐渐合理(++)?
image.png
不是,Applet的特性,怎么能一直删到JDK17( ﹁ ﹁ ) ~→还有Vector ,这玩意能整出来几套啊,和我最初在JDK7学的都不是同一个东西了
image.png
不出所料,好多人和我一样是课程结束才有时间去看MOOC的测验卷emm(⓿
⓿)
image.png
C#还真的就全是工控软件的招聘呗
image.png
今天完成编码方式迁移的测试,把sun公司的内部包sun.misc使用到的方法全部移除干净,为日后项目从JDK8迁移至更高版本的JDK做好铺垫。Cache_355938b28fd08fbe.jpg

  1. //旧的编码类
  2. result[i] = new BASE64Encoder().encodeBuffer(key).replaceAll("[\\s*\t\n\r]", "");
  3. //新的编码类
  4. result[i] = Base64.getEncoder().encodeToString(key).replaceAll("[\\s*\t\n\r]", "");
  5. //旧的解码类
  6. byte[] bytes = new BASE64Decoder().decodeBuffer(name);
  7. //新的解码类
  8. byte[] bytes = Base64.getDecoder().decode(name);

7.09

说起来,这个JsonMapper().writeValueAsString()干了啥。。。。居然会强转Date类为时间戳
image.png
顺便发现了Swagger2的bug,改成OpenAPI解决。
image.pngimage.png
学redis才知道微软居然维护过Redis的windows版本emmm(。﹏。)不过现在微软不承认罢了,不过学习还是用了一下,后面redis的学习之路,就到Linux服务器上了。
image.png
对Mybatis的动态sql的等于条件的尝试此前没有注意过,这个==有点微妙,交换单引号和双引号位置,记录一下。首先定义mapper中的sql语句:

  1. <select id="querytestsg" parameterType="map" resultType="blog">
  2. select *
  3. from mybatis.blog
  4. <where>
  5. <choose>
  6. <when test='title != null and author == "泠恒谦说2"'>
  7. author = #{author} and title = #{title}
  8. </when>
  9. <when test='title == null and author == "泠恒谦说2"'>
  10. author =#{author}
  11. </when>
  12. <otherwise>
  13. title = #{title}
  14. </otherwise>
  15. </choose>
  16. </where>
  17. </select>

然后写接口和测试方法:(这两个在不同类,我节约博客空间就合在一起了)

  1. List<Blog> querytestsg(Map map);
  2. @Test
  3. public void querytestsg(){
  4. SqlSession sqlSession = MybatisUtils.getSqlSession();
  5. BlogMapper mapper = sqlSession.getMapper(BlogMapper.class);
  6. HashMap map = new HashMap();
  7. map.put("title", "Java如此简单2");
  8. map.put("author", "泠恒谦说2");
  9. List<Blog> blogs = mapper.querytestsg(map);
  10. for (Blog blog : blogs) {
  11. System.out.println(blog);
  12. }
  13. sqlSession.close();
  14. }

库表沿用之前学Mybatis那张
image.png
测试结果,三种都正常识别,完成测试,好耶♪(´▽`)(这当然不是log4j的功劳,这就是mybatis里面logImpl的STDOUT_LOGGING)

  1. <settings>
  2. <setting name="logImpl" value="STDOUT_LOGGING"/>
  3. <setting name="mapUnderscoreToCamelCase" value="true"/>
  4. </settings>
  1. Created connection 732597634.
  2. ==> Preparing: select * from mybatis.blog WHERE author = ? and title = ?
  3. Created connection 732597634.
  4. ==> Preparing: select * from mybatis.blog WHERE author =?
  5. Created connection 732597634.
  6. ==> Preparing: select * from mybatis.blog WHERE title = ?

7.15

又要写回忆录又要整工作备忘录,这个暑假应该不会管这个FS了,把两个月的博客合成一篇吧(慵懒)看了眼Gitee,我刷Commit一直有一手的(≧∇≦)ノ
image.png
image.png
image.pngimage.png
之前还整理了EHCache2.10.x提到xml配置的wiki页面——为什么是EHCache2.10.x而不是EHCache3.8?这就要牵扯到我的学习路线了,这个学期初是先学Mybatis,再学Spring和SpringMVC,因此在Mybatis的二级缓存那里,我调了一个mybatis和第三方实现ehcache的整合包mybatis-ehcache(org.mybatis.caches:mybatis-ehcache:1.2.1),版本为当时最新的1.2.1,里面用的EHCache就是2.10.6(net.sf.ehcache:ehcache:2.10.6),噗嗤🤣

  1. <!-- https://mvnrepository.com/artifact/org.mybatis.caches/mybatis-ehcache -->
  2. <dependency>
  3. <groupId>org.mybatis.caches</groupId>
  4. <artifactId>mybatis-ehcache</artifactId>
  5. <version>1.2.1</version>
  6. </dependency>
  1. 里面废话成分比较多,我当时就整合一下MybatisEHCache,哪有Web(这是不久后SpringMVC的后话了),Google App Engine(一种让您可以在 Google 的基础架构上运行您的网络应用程序,有什么用),OpenJPAApache 组织提供的开源项目,它实现了 EJB 3.0 中的 JPA 标准,为开发者提供功能强大、使用简单的持久化数据管理框架,我用的类似JPA的工具就只有Mybatis-Plus),Grails(一套用于快速Web应用开发的开源框架,它基于Groovy编程语言,并构建于SpringHibernate等开源框架之上,是一个高生产力一站式框架,Groovy这个懂得都懂,我就在翻Shiro的案例时见过这门语言,挺像Python的,脚本语言一个德性——当然,比JavaScript有德性)<br />![JavaDoc还离谱.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355410493-018954ad-7246-4bf6-a555-d2bcf1011c49.png#height=452&id=ue5ee5217&margin=%5Bobject%20Object%5D&name=JavaDoc%E8%BF%98%E7%A6%BB%E8%B0%B1.png&originHeight=903&originWidth=1862&originalType=binary&ratio=1&size=131750&status=done&style=none&width=931)<br />![第二处的离谱.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355418530-e84b4e24-1a3b-4807-adf4-d6a7bc72a52f.png#height=449&id=uaf07fd86&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E4%BA%8C%E5%A4%84%E7%9A%84%E7%A6%BB%E8%B0%B1.png&originHeight=898&originWidth=1862&originalType=binary&ratio=1&size=137061&status=done&style=none&width=931)<br />![第三处.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355452295-c0176b45-62b9-403b-8bf9-24f94567e86c.png#height=462&id=ub6599c9b&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E4%B8%89%E5%A4%84.png&originHeight=923&originWidth=1866&originalType=binary&ratio=1&size=180227&status=done&style=none&width=933)<br />![第四处.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355459610-66596bda-b926-4e1a-9716-79aeb39b7236.png#height=471&id=u04e89c41&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E5%9B%9B%E5%A4%84.png&originHeight=942&originWidth=1861&originalType=binary&ratio=1&size=210648&status=done&style=none&width=930.5)<br />![第五处.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355467568-3e6d0cb1-9e4b-40a8-bed1-ad1effb1c5c5.png#height=451&id=u464fc379&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E4%BA%94%E5%A4%84.png&originHeight=902&originWidth=1865&originalType=binary&ratio=1&size=140891&status=done&style=none&width=932.5)![第六处.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355475266-08f2cb1f-74dd-4d13-9469-1cfdf5da0040.png#height=454&id=u7f83a3cb&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E5%85%AD%E5%A4%84.png&originHeight=908&originWidth=1870&originalType=binary&ratio=1&size=147755&status=done&style=none&width=935)![第七处.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355481403-602ed131-b74a-40b1-aa1e-63af03d16ab0.png#height=459&id=u820860ac&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E4%B8%83%E5%A4%84.png&originHeight=918&originWidth=1857&originalType=binary&ratio=1&size=168488&status=done&style=none&width=928.5)![第八处.png](https://cdn.nlark.com/yuque/0/2021/png/2317523/1626355485831-da21bbec-f95e-4a19-86d8-99363dd5ffdf.png#height=456&id=u73143d60&margin=%5Bobject%20Object%5D&name=%E7%AC%AC%E5%85%AB%E5%A4%84.png&originHeight=912&originWidth=1857&originalType=binary&ratio=1&size=169371&status=done&style=none&width=928.5)<br />我提供两个参考链接,[https://github.com/mybatis/ehcache-cache](https://github.com/mybatis/ehcache-cache),要说明的是这个org.mybatis.caches:mybatis-ehcache:1.2.1并不是EHCache的,而是Mybatis的。一个是该Maven包的Github地址,尽管一年没更新,但Github最近——就在24天前依然有Commit记录。另一个是项目的主页,这个大大的mybatis.org看到了吧[http://mybatis.org/ehcache-cache/index.html#](http://mybatis.org/ehcache-cache/index.html#)。翻一下Maven仓库的主页就能找到[https://mvnrepository.com/artifact/org.mybatis.caches/mybatis-ehcache](https://mvnrepository.com/artifact/org.mybatis.caches/mybatis-ehcache)<br />对于联网情况下引用ehcache.xsd(没办法,官网的3.x版本就是在线引用,而2.x版本文档里都是直接xsi:noNamespaceSchemaLocation="[ehcache.xsd"](https://www.ehcache.org/ehcache.xsd")),这个嘛,官网文档有,[https://www.ehcache.org/generated/2.10.4/html/ehc-all/#page/Ehcache_Documentation_Set%2Fre-ehcache_reference_documentation.html%23](https://www.ehcache.org/generated/2.10.4/html/ehc-all/#page/Ehcache_Documentation_Set%2Fre-ehcache_reference_documentation.html%23)里面提到了,就是[https://www.ehcache.org/ehcache.xsd](https://www.ehcache.org/ehcache.xsd),注意是https了,网络上的csdn博文多多少少还有些是http。<br />对于最近那份snyk出品的JVM生态的报告,我明天谈一谈。

7.17

JVM Ecosystem Report 2021.pdf
不对劲,这份文件怎么这么大(´。_。`)今天Jetbrains的报告也出了,我觉得比snyk有说服力,不过,先谈snyk这份(https://snyk.io/jvm-ecosystem-report-2021/),jetbrains报告的原始数据还没出来
首先是Adoptopenjdk在份额上成功干掉了OracleJDK,社区驱动的力量展现出来了。It is interesting to see that 44.1% of respondents use the free AdoptOpenJDK distribution in production, making it the most prevalent in our survey. However, we can also see that Oracle is still a big player in the market, with 28% for their OpenJDK build and 23% for the commercial Oracle JDK.
image.png
然后是我觉得最惊讶的地方,JDK11居然比JDK8的使用比例更高,woc要变天了(然后Jetbrains报告显示成功打回了原型)We found out that 40% of the survey participants use more than one Java version in production. Because of this, we can also conclude that more people than we realized do upgrade to versions beyond 8. Currently, 61.5% are using Java 11 in production, and almost 12% are using the latest release, which was Java 15 during the survey. This shows that developers do upgrade their Java version beyond Java 8
image.png
JVM生态里只能有一个王,其实比起Kotlin,我更看好Groovy(Kotlin扬言要干掉Java,太哈人了我先run了),至于Scala,这个我还没接触,得观望,在流式计算里用途好像蛮广的(应用大概类似时下流行的大数据)While the variety of JVM languages grew over the last couple of years, Java is very much on top. With over 90% of developers using Java, we can see that it remains a very popular language. The popularity of Kotlin is more extensive than we thought last year. With an impressive 17.7% of the developers using Kotlin in production.
image.png
Eclipse真是可惜啊,好歹是好几代人(包括我)的Java启蒙IDE,现在混的差点被VSCode干掉了(VSCode对Java生态的支持是灾难级的,不过微软有公布一个支持路线,详情https://devblogs.microsoft.com/java/java-on-visual-studio-code-update-june-2021/)For years, we’ve seen the dominance of JetBrains IntelliJ IDEA in the Java ecosystem. This year is not any different. IntelliJ IDEA is the most widely used within the JVM community. Also, the adoption of Visual Studio Code and Apache Netbeans grew tremendously.
We found out that more than half of the JVM community sees fit for multiple IDEs.
image.png
Maven在可见的未来依然是项目构建工具的行业标准,Gradle这种号称下一代自动化工具的构建工具还是要学习一个姿势(起码我没用Gradle,不过SpringBoot,Shiro和Swaggger的源码都用到了emmmm)Maven is still the number one build system for the Java ecosystem. With more than 76% of developers using Maven, it is even higher than in last year’s survey. Gradle is comfortably holding second place with 38.1%, also scoring higher than it did last year.
image.png
Web应用的主流框架依然是SpringBoot和SpringMVC,JavaEE的份额是因为历史沉淀, 其他的没有明显竞争力。让我惊讶的是Jakarta EE,Spring框架都没开始支持,已经有这么多开发者响应使用了(其实我在单纯的JavaWeb项目里也是将Java EE8更新到Jakarta EE9,不过代码量没有变,变得只是命名空间emmm)The Java world is still a Spring-dominated world, with over half of the market using Spring Boot and almost a third using Spring MVC. In general, we see that we live in a highly Spring-dominated universe, which appears to indicate that the Spring folks are doing a great job serving the community.
image.png

7.19

之前在源码之家下载了一份JS的远古代码, 本来右键用NotePad++打开的, 一不小心直接点击了一次—Windows Based Script Host这图标, 不会是Windows 2000的遗留物吧(⊙x⊙;)
image.png
效果很一般般,嗯哼(是小400行的js)
image.pngimage.png
和隔壁那个仿皇室战争风格的js文件相比是小了
image.png
image.png
对于前面提到的那个青蛙吃苍蝇的小游戏,就一个html,js代码套进去,都不需要创建额外的js文件. 也是源码之家下载的, 啊这

image.png

7.20

在Tomcat9及更往前的时代, JSTL表达式不仅需要导入javax.servlet.jsp.jstl:jstl, 为了引入c:out这样的标签,还需要导入一个standard标签库, 也就是taglibs:standard, 这个是2005年的老货了,同在Apache下,他有个2015年的新封装为org.apache.taglibs:taglibs-standard-impl. 不过在Tomcat 10之后,Java EE8更改为Jakarta EE9(现在已经进入Jakarta 9.1,当然还没有正式出来比较兼容的实现产品),在原先org.apache.taglibs:taglibs-standard-impl的官网—其实就是Tomcat的官网,有对Apache Taglibs和Apache Standard Taglib两个产品的介绍, 并且介绍了Jakarta Taglibs, 目前已经退休了,项目被丢入The Apache Attic,附上链接https://tomcat.apache.org/taglibs.html. Apache Taglibs were originally developed as part of the Apache Jakarta project. That project has officially been retired and the original tag libraries moved to the Apache Attic.如其所言.
之前跳过JSP直接玩前端,到底有点可惜,现在看了看JSTL,这玩意几乎封装完了所有的Java语法,鬼鬼……附上Apache Standard Taglib的官方使用教程:https://downloads.apache.org/tomcat/taglibs/taglibs-standard-1.2.5/README_bin.txt, 和我之前学的还是存在出入,尽可能还原一项技术最初的面貌还是比较不错的.

  1. ---------------------------------------------------------------------------
  2. Apache Standard Tag Library 1.2.5 -- BINARY DISTRIBUTION
  3. ---------------------------------------------------------------------------
  4. Thanks for downloading this release of the Standard tag library,
  5. an implementation of the JavaServer Pages(tm)(JSP)
  6. Standard Tag Library (JSTL).
  7. This code is licensed to you by the Apache Software Foundation and its
  8. contributors under the terms of the Apache License V2.0;
  9. please see the included NOTICE and LICENSE files for details.
  10. JSTL is an effort of the Java Community Process (JCP) and
  11. comes out of the JSR-052 expert group. For more information on JSTL,
  12. please go to http://jcp.org/en/jsr/detail?id=52 .
  13. ---------------------------------------------------------------------------
  14. LIBRARY DEPENDENCIES
  15. This version of the Standard Tag Library has the following runtime
  16. dependencies:
  17. 1. Dependencies provided by a JSP 2.1 container:
  18. - Java 1.5 or later
  19. - Servlet 2.5 or later
  20. - JSP 2.1 or later
  21. 2. Additional dependencies
  22. - The XML tag library requires Apache Xalan 2.7.1 or later
  23. ---
  24. Apache Xalan 2.7.1
  25. To address performance issues with XSLT processing, this version relies on
  26. implementation specific functionality from Apache Xalan. The following
  27. libraries should be included in the classpath for your application:
  28. - xalan-2.7.1.jar
  29. - serializer-2.7.1.jar
  30. ---------------------------------------------------------------------------
  31. ADD DEPENDENCIES TO A WEB APPLICATION
  32. To use this distribution with your own web applications, add the following JAR
  33. files to the '/WEB-INF/lib' directory of your application:
  34. - taglibs-standard-spec-1.2.5.jar
  35. - taglibs-standard-impl-1.2.5.jar
  36. - taglibs-standard-jstlel-1.2.5.jar
  37. - xalan-2.7.1.jar
  38. - serializer-2.7.1.jar
  39. If you do not use JSTL 1.0 tags then the "taglibs-standard-jstlel" JAR may be
  40. omitted. If you do not use the XML library, then the Apache Xalan dependencies
  41. may also be omitted.
  42. If you build you application with Maven, add the following dependencies to
  43. your pom.xml file:
  44. <dependency>
  45. <groupId>org.apache.taglibs</groupId>
  46. <artifactId>taglibs-standard-spec</artifactId>
  47. <version>1.2.5</version>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.apache.taglibs</groupId>
  51. <artifactId>taglibs-standard-impl</artifactId>
  52. <version>1.2.5</version>
  53. </dependency>
  54. ---------------------------------------------------------------------------
  55. USING JSTL TAGS FROM A JSP
  56. The JSTL tag library can be imported into your pages with the following directives:
  57. CORE LIBRARY
  58. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  59. XML LIBRARY
  60. <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
  61. FMT LIBRARY
  62. <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
  63. SQL LIBRARY
  64. <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
  65. FUNCTIONS LIBRARY
  66. <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
  67. ---------------------------------------------------------------------------
  68. COMPATIBILITY
  69. The 1.2 version of the Standard Taglib has been tested using Tomcat 7.0.57
  70. and should work in any compliant JSP 2.1 (or later) container.
  71. In version 1.2.3 and later, the XML libraries enable FEATURE_SECURE_PROCESSING
  72. when parsing and transforming. The system property
  73. org.apache.taglibs.standard.xml.accessExternalEntity
  74. can be used to further restrict the protocols over which external entities can
  75. be resolved. When a SecurityManager is enabled this will, by default, allow
  76. access to no protocols. Permission must be granted to the taglibs-standard-impl
  77. library to read this property.
  78. permission java.util.PropertyPermission "org.apache.taglibs.standard.xml.accessExternalEntity", "read";
  79. ---------------------------------------------------------------------------
  80. COMMENTS AND QUESTIONS
  81. Please join the taglibs-user@tomcat.apache.org mailing list if you have
  82. general usage questions about Apache Taglibs.
  83. Comments about the JSTL specification itself should be sent to
  84. jsr-52-comments@jcp.org.
  85. Enjoy!

Enjoy!(笑)

7.21

分析Bootstrap5.0.2的Example时,我意识到我对JavaScript过于依赖jQuery,匿名函数我居然没尝试过…..引入AK_TUTU的博客,来阐述(function(){})()的含义,注意不是jQuery那种$ (function () {});,那种是简写了ready().博文如下https://www.cnblogs.com/zzhangkuoo/p/9836807.html

  1. 代码如下:
  2. (function(){
  3. //这里忽略jQuery所有实现
  4. })();
  5. (function(){ //这里忽略jQuery所有实现 })();
  6.   半年前初次接触jQuery的时候,我也像其他人一样很兴奋地想看看源码是什么样的。然而,在看到源码的第一眼,我就迷糊了。为什么只有一个匿 名函数又没看到运行(当然是运行了……),就能有jQuery这么个函数库了?于是,我抱着疑问来到CSDN。结果相信现在很多人都很清楚了(因为在我之 后也不乏来者,呵呵~)。当一个匿名函数被括起来,然后再在后面加一个括号,这个匿名函数就能立即运行起来!真神奇哦!
  7.   嘿嘿!胡闹到此为止。在这一节,我们碰到的jQuery片段是一组立即运行的匿名函数。而这种用法在论坛上也曾引起过激辩——这段代码究竟属不 属于闭包呢?带着这个疑问,我们从基础开始,分析每个关键要素,寻找属于自己的答案。(没错,自己的答案!在我看来,所有理论只是形式,只要它有利于我们 的应用实现,就是可取的——黑猫白猫,抓到老鼠的就是好猫!)
  8.   要说匿名函数,我们首先要由函数本身说起。函数的定义如下:
  9. 函数是将唯一的输出值赋予给每一输入的“法则”。
  10.   当然,这只是数学上的定义。但是,在计算机编程语言中,函数的定义也八九不离十。因为,我们都知道,计算机中的函数,也类似数学定义中的描述,它是将输入的若干数据,经过代码设定的逻辑操作处理后,返回唯一的输出的一组代码组合块。——当然,特例是,输入的数据为空或输出的数据为空,或者两者都为空。
  11.   下面,我们先初步了解一下和匿名函数相关的概念。
  12. 函数声明(function 语句)
  13.   要使用一个函数,我们就得首先声明它的存在。而我们最常用的方式就是使用function语句来定义一个函数,如:
  14. 复制代码 代码如下:
  15. function abc(){
  16. // code to process
  17. }
  18. function abc(){ // code to process }
  19.   当然,你的函数也可以是带参数的,甚至是带返回值的。
  20. view plaincopy to clipboardprint?
  21. function abc(x,y){
  22. return x+y;
  23. }
  24. function abc(x,y){ return x+y; }
  25.   但是,无论你怎么去定义你的函数,JS解释器都会把它翻译成一个Function对象。例如,你在定义上面的其中一个例子的函数号,再输入如下代码:
  26. alert(typeof abc);// "function"
  27.   你的浏览器就会弹出提示框,提示你abc是一个Function对象。那么Function对象究竟是什么呢?
  28. Function 对象
  29.   Function对象是JavaScript里面的固有对象,所有的函数实际上都是一个Function对象。关于这个方面的讨论,我们留到下一个专题节。我们先看看,Function对象能不能直接运用构造函数创建一个新的函数呢?答案是肯定的。例如:
  30. 复制代码 代码如下:
  31. var abc = new Function("x","y","return x*y;");
  32. alert(abc(2,3)); // "6"
  33. var abc = new Function("x","y","return x*y;"); alert(abc(2,3)); // "6"
  34.   相信大家现在对如何声明一个函数应该是有所了解了。那么什么才是匿名函数呢?
  35. 声明匿名函数
  36.   顾名思义,匿名函数就是没有实际名字的函数。例如,我们把上面的例子中,函数的名字去掉,再判断一下他是不是一个函数:
  37. 复制代码 代码如下:
  38. alert(typeof function(){});// "function"
  39. alert(typeof function(x,y){return x+y;});// "function"
  40. alert(typeof new Function("x","y","return x*y;"))// "function"
  41. alert(typeof function(){});// "function"
  42. alert(typeof function(x,y){return x+y;});// "function"
  43. alert(typeof new Function("x","y","return x*y;"))// "function"
  44.   我们可以很容易地看到,它们全都是Function对象,换言之,他们都是函数,但是他们都有一个特点——没有名字。所以我们把他们称作“匿名函数”。然而,正因为他们没有“名字”,我们也没有办法找到他们。这就引申了如何去调用一个匿名函数的问题了。
  45. 匿名函数的调用
  46.   要调用一个函数,我们必须要有方法定位它,引用它。所以,我们会需要帮它找一个名字。例如:
  47. 复制代码 代码如下:
  48. var abc=function(x,y){
  49. return x+y;
  50. }
  51. alert(abc(2,3)); // "5"
  52. var abc=function(x,y){ return x+y; } alert(abc(2,3)); // "5"
  53.   上面的操作其实就等于换个方式去定义函数,这种用法是我们比较频繁遇到的。例如我们在设定一个DOM元素事件处理函数的时候,我们通常都不会为他们定名字,而是赋予它的对应事件引用一个匿名函数。
  54.   对匿名函数的调用其实还有一种做法,也就是我们看到的jQuery片段——使用()将匿名函数括起来,然后后面再加一对小括号(包含参数列表)。我们再看一下以下例子:
  55. 复制代码 代码如下:
  56. alert((function(x,y){return x+y;})(2,3));// "5"
  57. alert((new Function("x","y","return x*y;"))(2,3));// "6"
  58. alert((function(x,y){return x+y;})(2,3));// "5" alert((new Function("x","y","return x*y;"))(2,3));// "6"
  59.   很多人或许会奇怪,为什么这种方法能成功调用呢?觉得这个应用奇怪的人就看一下我以下这段解释吧。
  60.   大家知道小括号的作用吗?小括号能把我们的表达式组合分块,并且每一块,也就是每一对小括号,都有一个返回值。这个返回值实际上也就是小括号中表达式的返回值。所以,当我们用一对小括号把匿名函数括起来的时候,实际上小括号对返回的,就是一个匿名函数的Function对象。因此,小括号对加上匿名函数就如同有名字的函数般被我们取得它的引用位置了。所以如果在这个引用变量后面再加上参数列表,就会实现普通函数的调用形式。
  61.   不知道以上的文字表述大家能不能看明白,如果还是理解不了的话,再看一下以下的代码试试吧。
  62. 复制代码 代码如下:
  63. var abc=function(x,y){return x+y;};// 把匿名函数对象赋给abc
  64. // abc的constructor就和匿名函数的constructor一样了。也就是说,两个函数的实现是一样的。
  65. alert((abc).constructor==(function(x,y){return x+y;}).constructor);
  66. var abc=function(x,y){return x+y;};// 把匿名函数对象赋给abc // abc的constructor就和匿名函数的constructor一样了。也就是说,两个函数的实现是一样的。 alert((abc).constructor==(function(x,y){return x+y;}).constructor);
  67.   PSconstructor是指创建对象的函数。也就是函数对象所代表的函数体。
  68.   总之,将其(被小括号包含的匿名函数)理解为括号表达式返回的函数对象,然后就可以对这个函数对象作正常的参数列表调用了。(前面这里犯了个错 误,只有函数表达式还是不能直接调用函数的,去掉匿名函数括号必须要伴随将表达式赋值。也就是(function(){alert(1)})()应该是与 a=function(){alert(1)}()等价,不能连a=都去掉。)
  69. 闭包
  70.   闭包是什么?闭包是指某种程序语言中的代码块允许一级函数存在并且在一级函数中所定义的自由变量能不被释放,直到一级函数被释放前,一级函数外也能应用这些未释放的自由变量。
  71.   怎样?看得一头冒汗吧……没事,我也是(虽然是我是了解的,只是表达能力的问题)。让我们换个更加简单的方法说明:闭包,其实是一种语言特性,它是指的是程序设计语言中,允许将函数看作对象,然后能像在对象中的操作搬在函数中定义实例(局部)变量,而这些变量能在函数中保存到函数的实例对象销毁为止,其它代码块能通过某种方式获取这些实例(局部)变量的值并进行应用扩展。
  72.   不知道这么再解释后会否更加清晰,如果还是不明白,那么我们再简化一下:闭包,其实就是指程序语言中能让代码调用已运行的函数中所定义的局部变量。
  73.   现在我们看一个例子:
  74. 复制代码 代码如下:
  75. var abc=function(y){
  76. var x=y;// 这个是局部变量
  77. return function(){
  78. alert(x++);// 就是这里调用了闭包特性中的一级函数局部变量的x,并对它进行操作
  79. alert(y--);// 引用的参数变量也是自由变量
  80. }}(5);// 初始化
  81. abc();// "5" "5"
  82. abc();// "6" "4"
  83. abc();// "7" "3"
  84. alert(x);// 报错!“x”未定义!
  85. var abc=function(y){ var x=y;// 这个是局部变量 return function(){ alert(x++);// 就是这里调用了闭包特性中的一级函数局部变量的x,并对它进行操作 alert(y--);// 引用的参数变量也是自由变量 }}(5);// 初始化 abc();// "5" "5" abc();// "6" "4" abc();// "7" "3" alert(x);// 报错!“x”未定义!
  86.   看到这里,你能判断究竟jQuery的那个代码片段是否闭包了吗?
  87.   以我的理解来说吧。是否应用了闭包特性,必须确定该段代码有没有 最重要的要素:未销毁的局部变量。那么很显然,没有任何实现的匿名函数不可能应用了闭包特性。但如果匿名函数里面有实现呢?那也还得确定它的实现中有没有 用到那些未销毁的局部变量。所以如果问你那个开篇中的jQuery代码片段是应用了JS里的什么特性?那么它只是匿名函数与匿名函数的调用而已。但是,它 隐含了闭包的特性,并且随时可以实现闭包应用。

闭包简单来说就是函数里面的函数,我们不妨引用火狐官方的定义—一个函数和对其周围状态(lexical environment,词法环境)的引用捆绑在一起(或者说函数被引用包围),这样的组合就是闭包(closure)。也就是说,闭包让你可以在一个内层函数中访问到其外层函数的作用域。在 JavaScript 中,每当创建一个函数,闭包就会在函数创建的同时被创建出来。
这东西纯纯恶心人, 建议去看原型链更好理解这一块.
把之前练习thymeleaf的第一个web项目,里面不是用的Bootstrap4.0的组件嘛, 花了一阵子时间改成Bootstrap5.0.2, 从5.0开始Bootstrap移除了jQuery,嗯,趋势吧,不知道怎么说.
遇到一个组件碰撞的小bug,虽然改成功了,但有没有谁能告诉我在Bootstrap中,ml-sm-auto(Bootstrap4)和ms-sm-auto(Bootstrap5)有什么区别emmm
btn-sm和btn-lg之前搞混了,一个是小按钮,一个是大按钮

7.25

支持售后中文问答?好耶,把之前IntellIj Blog的问题甩邮件过去,问客服关于Jakarta EE的问题,不太好意思去Jakarta EE社区群问,这个纯纯的IDE问题,项目跑起来都没事image.png
现在大学我还是维持每天检查邮箱,回复邮件列表的习惯,聊天软件我应该只维护钉钉和QQ, 每次打开微信都会看到企业微信的准点消息,害

7.26

为了做到前端独立部署,开始尝试使用Vue Cli,不过我依然是用@vue/cli-init来拉取了Vue CLI 2.x 模板(这个其实就是以前Vue CLI2.x时代的vue-cli),@vue/cli是Vue CLI3以后的npm包,对webpack的自定义配置改了(对,就是改成在那个vue.config.js里配置),有点不习惯,先用着玩.(尤大倒是不喜欢Webpack,自己搞鼓Vite)image.png
大概理一下Study组内的方向,学网安的还真不少,对a,小△,小🐣,艾尔(德利奇),然后呢小H是硬件方向,小乐是算法方向,目前就我是Web开发(这个其实说的是前端后端运维这种Full Stack,security这一块我用SpringSecurity和ApacheShiro框架解决了我能解决的问题),想到什么就往todo写什么emmm,其他人我也不知道,我开始处理算法还得过渡到下个月.

7.29

sass-loader的版本问题我完全理解不了(less就图一乐,大家都用sass做css预处理),Github页也没见提.更奇妙的是在之前npm install的时候,同时安装sass-loader和node-sass是会报ERROR的,但cnpm install就没事(。_。)根据知乎的相关文章,sass-loader从12.1.0降级到7.3.1,node-sass从6.0.1降级到4.14.1,双降版本也没能解决.我只在node-sass的相关看到版本对应图,我之前项目的node-sass是6.0.1没错,但我用的node.js也不是14那个LTS版本啊,我用的node.js是16emmmhttps://github.com/sass/node-sass
来Look一下这段报错(手动隐藏文件具体目录),再指路node-sass的npm页https://www.npmjs.com/package/node-sass
嗯,4.14.1是去年5月的版本,突然到5.0.0,马上刷到6.0.0,太怪了

  1. ERROR Failed to compile with 1 errors 下午9:32:08
  2. error in ./src/views/Login.vue
  3. Module build failed: Error: Node Sass version 6.0.1 is incompatible with ^4.0.0.
  4. at getRenderFuncFromSassImpl (D:\xxx\node_modules\sass-loader\dist\index.js:165:13)
  5. at Object.loader (D:\xxx\node_modules\sass-loader\dist\index.js:79:18)
  6. @ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-26084dc2","scoped":true,"hasInline
  7. Config":false}!./node_modules/sass-loader/dist/cjs.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/views/Login.vue 4:14-370 13:3-17:5 14:22-37
  8. 8
  9. @ ./src/views/Login.vue
  10. @ ./src/router/index.js
  11. @ ./src/main.js
  12. @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

image.png
image.png

7.30

尝试直接使用@vue/cli直接在构建时安装node-sass,居然也失败了emmm还是老老实实换回nodejs14吧
换回node.js14就编译正常…..万幸吧

  1. Vue CLI v4.5.13
  2. Creating project in D:\xxx.
  3. 🗃 Initializing git repository...
  4. ⚙️ Installing CLI plugins. This might take a while...
  5. > yorkie@2.0.0 install D:\xxx\node_modules\yorkie
  6. > node bin/install.js
  7. setting up Git hooks
  8. done
  9. > core-js@3.15.2 postinstall D:\xxx\node_modules\core-js
  10. > node -e "try{require('./postinstall')}catch(e){}"
  11. > ejs@2.7.4 postinstall D:\xxx\node_modules\ejs
  12. > node ./postinstall.js
  13. added 1255 packages from 656 contributors and audited 1258 packages in 67.49s
  14. 79 packages are looking for funding
  15. run `npm fund` for details
  16. found 7 moderate severity vulnerabilities
  17. run `npm audit fix` to fix them, or `npm audit` for details
  18. 🚀 Invoking generators...
  19. 📦 Installing additional dependencies...
  20. > node-sass@4.14.1 install D:\xxx\node_modules\node-sass
  21. > node scripts/install.js
  22. Downloading binary from https://github.com/sass/node-sass/releases/download/v4.14.1/win32-x64-83_binding.node
  23. Download complete ] - :
  24. Binary saved to D:\xxx\node_modules\node-sass\vendor\win32-x64-83\binding.node
  25. Caching binary to C:\Users\lingh\AppData\Roaming\npm-cache\node-sass\4.14.1\win32-x64-83_binding.node
  26. > node-sass@4.14.1 postinstall D:\xxx\node_modules\node-sass
  27. > node scripts/build.js
  28. Binary found at D:\xxx\node_modules\node-sass\vendor\win32-x64-83\binding.node
  29. Testing binary
  30. Binary is fine
  31. added 144 packages from 96 contributors and audited 1402 packages in 23.269s
  32. 86 packages are looking for funding
  33. run `npm fund` for details
  34. found 8 vulnerabilities (7 moderate, 1 high)
  35. run `npm audit fix` to fix them, or `npm audit` for details
  36. Running completion hooks...
  37. 📄 Generating README.md...
  38. 🎉 Successfully created project hello-vue.
  39. 👉 Get started with the following commands:
  40. $ cd hello-vue
  41. $ npm run serve

nodejs16改为nodejs14lts后,执行npm install sass-loader node-sass —save-dev(因为@vue/cli-init本身我就预先安装了webpack嘛,这里就不用重复安装了),一个sass-loader版本12.0.01,一个node-sass版本6.0.1,居然没报ERROR了,果然Node.js和JDK一样,不能紧追版本(好歹nodejs16今年10月就正式转为lts版本了啊,这么难)不过即使安装成功依然打包失败,还是得把sass-loader版本降到7.3.1

  1. npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
  2. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
  3. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  4. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
  5. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  6. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
  7. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  8. + vue-router@3.5.2
  9. added 1 package from 1 contributor, updated 1 package and audited 1285 packages in 6.834s
  10. 55 packages are looking for funding
  11. run `npm fund` for details
  12. found 22 vulnerabilities (3 low, 12 moderate, 7 high)
  13. run `npm audit fix` to fix them, or `npm audit` for details
  14. D:\xxx>npm i element-ui -S
  15. npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
  16. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
  17. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  18. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
  19. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  20. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
  21. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  22. + element-ui@2.15.3
  23. added 6 packages from 6 contributors and audited 1292 packages in 8.237s
  24. 55 packages are looking for funding
  25. run `npm fund` for details
  26. found 22 vulnerabilities (3 low, 12 moderate, 7 high)
  27. run `npm audit fix` to fix them, or `npm audit` for details
  28. D:\xxx>npm install sass-loader node-sass --save-dev
  29. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
  30. npm WARN deprecated har-validator@5.1.5: this library is no longer supported
  31. > node-sass@6.0.1 install D:\xxx\node_modules\node-sass
  32. > node scripts/install.js
  33. Downloading binary from https://github.com/sass/node-sass/releases/download/v6.0.1/win32-x64-83_binding.node
  34. Download complete ] - :
  35. Binary saved to D:\xxx\node_modules\node-sass\vendor\win32-x64-83\binding.node
  36. Caching binary to C:\Users\lingh\AppData\Roaming\npm-cache\node-sass\6.0.1\win32-x64-83_binding.node
  37. > node-sass@6.0.1 postinstall D:\xxx\node_modules\node-sass
  38. > node scripts/build.js
  39. Binary found at D:\xxx\node_modules\node-sass\vendor\win32-x64-83\binding.node
  40. Testing binary
  41. Binary is fine
  42. npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
  43. npm WARN sass-loader@12.1.0 requires a peer of webpack@^5.0.0 but none is installed. You must install peer dependencies yourself.
  44. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
  45. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  46. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents):
  47. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  48. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents):
  49. npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
  50. + sass-loader@12.1.0
  51. + node-sass@6.0.1
  52. added 146 packages from 127 contributors and audited 1438 packages in 30.446s
  53. 64 packages are looking for funding
  54. run `npm fund` for details
  55. found 22 vulnerabilities (3 low, 12 moderate, 7 high)
  56. run `npm audit fix` to fix them, or `npm audit` for details

算了,不折腾了,不用@vue/cli-init,直接使用@vue/cli吧,直接预安装sass加载器,使用@vue/cli默认的,果然成功了(使用sass加载器的主要原因是element-ui里有scss代码),我底层仅使用node-sass,不考虑dart-sass,node-sass只是没新功能,又没停止维护.
image.png
image.png

7.31

继Druid数据库连接池后,MabatisPlus这是我第二个看到在源码里使用中文注释的…..一个注意点是主键生成策略里的ID_WORKER(最初的推特的雪花算法),ID_WORKER_STR都过时了,在MybatisPlus3.3.0后这两个都是要换成ASSIGN_ID.
image.png
且看风吟,https://baomidou.com/guide/auto-fill-metainfo.html,在mybatis_plus官网的自动填充功能一节中,用了jdk8新的LocalDateTime类而不是传统的Date类,朋友说LocalDateTime类在此处有坑,没敢试.
image.png