摘要: 1.依赖 依赖就是有联系,有地方使用到它就是有依赖它,一个系统不可能完全避免依赖。如果你的一个类或者模块在项目中没有用到它,恭喜你,可以从项目中剔除它或者排除它了,因为没有一个地方会依赖它。下面看一个简单的示例: 上面是一个用户用播放器播放文件简单示例,用户操作是OperationMain类中的Pl 阅读全文
posted @ 2017-02-02 11:45 smallyaohailu 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 以前,一直以为在SpringMVC环境中,@RequestBody接收的是一个Json对象,一直在调试代码都没有成功,后来发现,其实 @RequestBody接收的是一个Json对象的字符串,而不是一个Json对象。然而在ajax请求往往传的都是Json对象,后来发现用 JSON.stringify 阅读全文
posted @ 2017-02-02 09:25 smallyaohailu 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 今天在学习JSP时先创建了一个web项目,后来在用到web.xml文件时,才发现项目创建时更本就没有自动创建web.xml文件,由于我今天第一次接触这个动态web的学习,所以也没有刻意拷贝的资源,于是我就废了好大的精力去找百度相关的解决方法,大神们的回答无非就是让拷贝一个web.xml文件过来,重新 阅读全文
posted @ 2017-01-28 15:13 smallyaohailu 阅读(3719) 评论(0) 推荐(2) 编辑
摘要: Spring 下载地址: http://repo.spring.io/release/org/springframework/spring/ http://repo.spring.io/release/org/springframework/spring/4.3.6.RELEASE/ http:// 阅读全文
posted @ 2017-01-28 13:56 smallyaohailu 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 获取所有注解 obj.getClass().getMethod("myMetch", String.class, int.class).getAnnotations() 运行结果: c:1m:myMetchmeta.length():80meta.name():测试带参数方法注解meta.age() 阅读全文
posted @ 2017-01-26 16:51 smallyaohailu 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 带参数的方法获取注解 阅读全文
posted @ 2017-01-26 15:50 smallyaohailu 阅读(3535) 评论(0) 推荐(0) 编辑
摘要: 利用反射调用注解 运行结果: meta.length():2meta.name():测试注解meta.age():0 阅读全文
posted @ 2017-01-26 15:24 smallyaohailu 阅读(231) 评论(0) 推荐(0) 编辑
摘要: java枚举类型 1。构造函数 2.ordinal 下标 3.对比 运行结果: IPHONE5Apple company IPHONE51-3 IPHONE8Apple company 4 阅读全文
posted @ 2017-01-24 03:26 smallyaohailu 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 利用Thread 类以及Runnable接口创建线程 运行结果: Child thread: Thread[I create a new thread.,5,main]Main thead: 0Chinld thead: 0Chinld thead: 1Main thead: 1Main thead 阅读全文
posted @ 2017-01-22 18:41 smallyaohailu 阅读(215) 评论(0) 推荐(0) 编辑
摘要: java 线程 获取当前线程 阅读全文
posted @ 2017-01-22 09:39 smallyaohailu 阅读(34550) 评论(0) 推荐(0) 编辑