Skip to content

Commit 026abb2

Browse files
committed
JavaStudy
1 parent e1e84d8 commit 026abb2

14 files changed

Lines changed: 171 additions & 4 deletions

.classpath

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="test"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.8.0_251"/>
6+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/cglib-nodep-3.1.jar"/>
7+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-collections-3.2.2.jar" sourcepath="D:/apache/commons-collections-3.2.2-sources.jar"/>
8+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-httpclient-3.1.jar" sourcepath="D:/FepH5Server/repo/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1-sources.jar"/>
9+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/dom4j-1.6.1.jar" sourcepath="D:/FepH5Server/repo/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
10+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jaxen-1.1.1.jar"/>
11+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jBCrypt-0.4.1.jar"/>
12+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/sa-jdi.jar"/>
13+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-io-2.5.jar"/>
14+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jstl-1.1.2.jar"/>
15+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/standard.jar"/>
16+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-dbutils-1.7.jar"/>
17+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-beanutils-1.9.4-20171008.104537-25.jar"/>
18+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-aop-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-aop-5.2.7.RELEASE-sources.jar"/>
19+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-aspects-5.2.7.RELEASE.jar"/>
20+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-beans-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-beans-5.2.7.RELEASE-sources.jar"/>
21+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-framework-5.2.7.RELEASE.zip"/>
22+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-core-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-core-5.2.7.RELEASE-sources.jar"/>
23+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-expression-5.2.7.RELEASE.jar"/>
24+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-jdbc-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-jdbc-5.2.7.RELEASE-sources.jar"/>
25+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-orm-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-orm-5.2.7.RELEASE-sources.jar"/>
26+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-tx-5.2.7.RELEASE.jar"/>
27+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-web-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-web-5.2.7.RELEASE-sources.jar"/>
28+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-webmvc-5.2.7.RELEASE.jar" sourcepath="D:/Spring/spring-5.2.7.RELEASE-dist/spring-framework-5.2.7.RELEASE/libs/spring-webmvc-5.2.7.RELEASE-sources.jar"/>
29+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-logging-1.2.jar"/>
30+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/aspectjweaver.jar" sourcepath="D:/Spring/aspectj-1.9.5-src/aspectjweaver-1.9.5-sources.jar"/>
31+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-fileupload-1.2.1.jar"/>
32+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-annotations-2.11.1.jar" sourcepath="D:/Jackson/jackson-annotations-2.11.1-sources.jar"/>
33+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-core-2.11.1.jar" sourcepath="D:/Jackson/jackson-core-2.11.1-sources.jar"/>
34+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-databind-2.11.1.jar" sourcepath="D:/Jackson/jackson-databind-2.11.1-sources.jar"/>
35+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-digester-1.6.jar"/>
36+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/asm-8.0.1.jar" sourcepath="D:/ASM/JAR包/asm-8.0.1-sources.jar"/>
37+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javassist.jar" sourcepath="D:/Javassist/javassist-rel_3_27_0_ga.zip"/>
38+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-1.2.17.jar"/>
39+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-api-2.13.3.jar"/>
40+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/log4j-core-2.13.3.jar"/>
41+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mybatis-3.5.5.jar" sourcepath="D:/MyBatis/mybatis-3-mybatis-3.5.5.zip"/>
42+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ognl-3.2.14.jar"/>
43+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-api-1.7.30.jar"/>
44+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/slf4j-log4j12-1.7.30.jar"/>
45+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/mybatis-spring-2.0.5.jar" sourcepath="D:/MyBatis/mybatis-spring-2.0.5-sources.jar"/>
46+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/ojdbc6-11.2.0.4.jar"/>
47+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tools.jar"/>
48+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/httpclient-4.5.9.jar" sourcepath="D:/apache/httpclient-4.5.9-sources.jar"/>
49+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/httpcore-4.4.11.jar" sourcepath="D:/apache/httpcore-4.4.11-sources.jar"/>
50+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/bcprov-ext-jdk15to18-166.jar"/>
51+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-codec-1.10.jar" sourcepath="D:/apache/commons-codec-1.10-sources.jar"/>
52+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.mail-1.6.2.jar" sourcepath="D:/apache/javax.mail-1.6.2-sources.jar"/>
53+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.mail-api-1.6.2.jar" sourcepath="D:/apache/javax.mail-api-1.6.2-sources.jar"/>
54+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/commons-math3-3.6.1.jar" sourcepath="D:/apache/commons-math3-3.6.1-sources.jar"/>
55+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-dataformat-xml-2.10.1.jar" sourcepath="D:/apache/jackson-dataformat-xml-2.10.1-sources.jar"/>
56+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/woodstox-core-asl-4.4.1.jar" sourcepath="D:/apache/woodstox-core-asl-4.4.1-sources.jar"/>
57+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/stax2-api-4.2.jar" sourcepath="D:/apache/stax2-api-4.2-sources.jar"/>
58+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-module-jaxb-annotations-2.11.2.jar"/>
59+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/fastjson-1.2.74.jar" sourcepath="D:/apache/fastjson-1.2.74-sources.jar"/>
60+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jackson-datatype-jsr310-2.11.1.jar" sourcepath="D:/apache/jackson-datatype-jsr310-2.11.1-sources.jar"/>
61+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/guava-18.0.jar" sourcepath="D:/apache/guava-18.0-sources.jar"/>
62+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/lettuce-core-5.1.8.RELEASE.jar"/>
63+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/pebble-3.1.2.jar" sourcepath="D:/apache/pebble-3.1.2-sources.jar"/>
64+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/HikariCP-3.3.1.jar" sourcepath="D:/apache/HikariCP-3.3.1-sources.jar"/>
65+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hsqldb-2.5.0.jar" sourcepath="D:/apache/hsqldb-2.5.0-sources.jar"/>
66+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.annotation-api-1.3.2.jar" sourcepath="D:/apache/javax.annotation-api-1.3.2-sources.jar"/>
67+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-core-5.4.2.Final.jar" sourcepath="D:/apache/hibernate-core-5.4.2.Final-sources.jar"/>
68+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.persistence-api-2.2.jar" sourcepath="D:/apache/javax.persistence-api-2.2-sources.jar"/>
69+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jboss-logging-3.4.1.Final.jar" sourcepath="D:/apache/jboss-logging-3.4.1.Final-sources.jar"/>
70+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/geronimo-jta_1.1_spec-1.1.1.jar"/>
71+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/byte-buddy-1.10.6.jar" sourcepath="D:/apache/byte-buddy-1.10.6-sources.jar"/>
72+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/hibernate-commons-annotations-5.1.1.Final.jar" sourcepath="D:/apache/hibernate-commons-annotations-5.1.1.Final-sources.jar"/>
73+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/classmate-1.5.1.jar" sourcepath="D:/apache/classmate-1.5.1-sources.jar"/>
74+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/antlr-2.7.7.jar"/>
75+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/pebble-spring5-3.1.3.jar" sourcepath="D:/apache/pebble-spring5-3.1.3-sources.jar"/>
76+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-websocket-5.2.7.RELEASE.jar" sourcepath="D:/apache/spring-websocket-5.2.7.RELEASE-sources.jar"/>
77+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-context-support-5.2.7.RELEASE.jar" sourcepath="D:/apache/spring-context-support-5.2.7.RELEASE-sources.jar"/>
78+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/artemis-jms-client-2.13.0.jar" sourcepath="D:/apache/artemis-jms-client-2.13.0-sources.jar"/>
79+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.jms-api-2.0.1.jar" sourcepath="D:/apache/javax.jms-api-2.0.1-sources.jar"/>
80+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/netty-handler-proxy-4.1.45.Final.jar" sourcepath="D:/apache/netty-handler-proxy-4.1.45.Final-sources.jar"/>
81+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/spring-jms-5.2.7.RELEASE.jar" sourcepath="D:/apache/spring-jms-5.2.7.RELEASE-sources.jar"/>
82+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/tomcat-juli-8.5.55.jar" sourcepath="D:/apache/tomcat-juli-8.5.55-sources.jar"/>
83+
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/thumbnailator-0.4.8.jar" sourcepath="D:/apache/thumbnailator-0.4.8-sources.jar"/>
84+
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
85+
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.5"/>
86+
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
87+
</classpath>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
eclipse.preferences.version=1
2+
encoding//WebContent/index.jsp=UTF-8
3+
encoding//WebContent/jsp/demo/encode.jsp=UTF-8
4+
encoding//WebContent/jsp/demo/lxf.jsp=UTF-8
5+
encoding//WebContent/session/sessionAddUser.jsp=UTF-8
6+
encoding//WebContent/session/sessionRemoveUser.jsp=UTF-8
7+
encoding/<project>=UTF-8
8+
encoding/README.md=UTF-8
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=1.8
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=1.8

src/com/yale/test/io/file/ZipInputStreamDemo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public static void main(String[] args) {
7070
* 我们要创建一个ZipInputStream,通常是传入一个FileInputStream作为数据源,然后,循环调用getNextEntry(),直到返回null,表示zip流结束。
7171
* 一个ZipEntry表示一个压缩文件或目录,如果是压缩文件,我们就用read()方法不断读取,直到返回-1:
7272
* 下面的代码没有考虑文件的目录结构。如果要实现目录层次结构,new ZipEntry(name)传入的name要用相对路径。
73+
* java.util.zip.ZipFile$ZipFileInflaterInputStream,赶紧Google发现还是有许多小伙伴碰到相同的问题,例如:Java压缩流GZIPStream导致的内存泄露 。
7374
*/
7475
try(ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(""))){
7576
File[] files = new File("").listFiles();

src/com/yale/test/io/file/jar/JarFileDemo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public static void main(String[] args) throws IOException {
4444
* ArrayDecoder源码来这里看
4545
* https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/63cecc0bd71d/src/share/classes/sun/nio/cs/ArrayDecoder.java
4646
* sun下面的都不在src.zip里
47+
* java.util.zip.ZipFile$ZipFileInflaterInputStream,赶紧Google发现还是有许多小伙伴碰到相同的问题,例如:Java压缩流GZIPStream导致的内存泄露 。
4748
*/
4849
String str = new String("D:\\浙商SVN\\03-开发\\修改说明UTF-8.zip");
4950
System.out.println(str);

src/com/yale/test/io/nio/NioClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
而异步IO是指,读写IO时仅发出请求,然后立刻执行后续代码,它的优点是CPU执行效率高,缺点是代码编写复杂。
1515
Java标准库的包java.io提供了同步IO,而java.nio则是异步IO。上面我们讨论的InputStream、OutputStream、Reader和Writer都是同步IO的抽象类,对应的具体实现类,以文件为例,有FileInputStream、FileOutputStream、FileReader和FileWriter。
1616
本节我们只讨论Java的同步IO,即输入/输出流的IO模型。
17+
* https://zhuanlan.zhihu.com/p/23488863 Java NIO浅析 美团技术团队
18+
* https://blog.csdn.net/u013096088/article/details/78774627#:~:text=DirectBy,%E5%BB%BA%E3%80%81%E4%BD%BF%E7%94%A8%E5%92%8C%E9%94%80%E6%AF%81%E3%80%82 Java NIO学习笔记三(堆外内存之 DirectByteBuffer 详解)
1719
*/
1820
public class NioClient {
1921
public void start(String nickName) throws IOException {

src/com/yale/test/io/nio/NioClientHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
import java.util.Iterator;
1010
import java.util.Set;
1111

12+
/*
13+
* https://zhuanlan.zhihu.com/p/23488863 Java NIO浅析 美团技术团队
14+
* https://blog.csdn.net/u013096088/article/details/78774627#:~:text=DirectBy,%E5%BB%BA%E3%80%81%E4%BD%BF%E7%94%A8%E5%92%8C%E9%94%80%E6%AF%81%E3%80%82 Java NIO学习笔记三(堆外内存之 DirectByteBuffer 详解)
15+
*/
1216
public class NioClientHandler implements Runnable{
1317

1418
private Selector selector;

src/com/yale/test/io/nio/NioServer.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@
1919
* 麻烦:NIO类库和API繁杂
2020
* 心累:可靠性能力补齐,工作量和难度都非常大
2121
* 有坑:Selector空轮询,导致CPU100%
22+
* https://zhuanlan.zhihu.com/p/23488863 Java NIO浅析 美团技术团队
23+
* https://blog.csdn.net/u013096088/article/details/78774627#:~:text=DirectBy,%E5%BB%BA%E3%80%81%E4%BD%BF%E7%94%A8%E5%92%8C%E9%94%80%E6%AF%81%E3%80%82 Java NIO学习笔记三(堆外内存之 DirectByteBuffer 详解)
24+
* https://cloud.tencent.com/developer/article/1129904 今咱们来聊聊JVM 堆外内存泄露的BUG是如何查找的
25+
* https://club.perfma.com/article/1835499?from=groupmessage#/article/1835499?from=groupmessage
26+
* 难道是linux glibc 中经典的 64M 内存问题?一次 Java 进程 OOM 的排查分析(glibc 篇) https://club.perfma.com/article/1709425?last=1714757&type=parent#/article/1709425?last=1714757&type=parent
27+
* JAVA堆外内存排查小结 https://zhuanlan.zhihu.com/p/60976273
28+
* https://developer.aliyun.com/article/657160 一次堆外内存泄露的排查过程
29+
* Linux中使用gdb dump内存 https://blog.csdn.net/qq_36119192/article/details/96474833
30+
* netty 堆外内存泄露排查盛宴 https://mp.weixin.qq.com/s/fxx_AxH2mbtsr5BgdZ6uFA https://github.com/mrniko/netty-socketio
2231
* @author dell
2332
*/
2433
public class NioServer {

src/com/yale/test/java/demo/pro/ProtectedTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* private 设定给大部分的实例变量,以及不想开发给外部程序调用的方法.
2626
*/
2727
public class ProtectedTest{
28+
29+
private float value;
2830
public static void main(String[] args) {
2931
SubPersonDemo spd = new SubPersonDemo("test", 10, 99);
3032
//int sc = spd.score;score是对象属性,只能在子类的对象方法里面使用
@@ -33,4 +35,8 @@ public static void main(String[] args) {
3335
//sc.score = 10;//因为在不同包中,这里会报错,只能在子类中使用,
3436
//sc.staticFile = 20;//因为在不同包中,这里会报错,只能在子类中使用
3537
}
38+
39+
public void testPrivate(ProtectedTest pt){
40+
System.out.println("这里可以直接调用private私有属性" + pt.value);
41+
}
3642
}

src/com/yale/test/leetcode/ClimStairs.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* 图解:什么是快速排序? https://mp.weixin.qq.com/s/xEmtuRnAPoEHGrOBO__b0w
66
* https://visualgo.net/zh/bst?slide=1
77
* https://visualgo.net/zh/bst?slide=1
8+
* https://visualgo.net/en 该网站有各种常用算法的可视化演示
89
* Redis 设计与实现 »:https://redisbook.readthedocs.io/en/latest/internal-datastruct/skiplist.html
910
* LRU缓存算法:https://www.jianshu.com/p/b1ab4a170c3c
1011
* 极客时间:算法训练营资料

0 commit comments

Comments
 (0)