Skip to content

Commit a9eaf16

Browse files
vonzhouvonzhou
vonzhou
authored and
vonzhou
committed
成功只有一种,那就是用自己喜欢的方式度过一生
1 parent fdeec3c commit a9eaf16

File tree

54 files changed

+1853
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1853
-17
lines changed

README.md

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
之前间歇的阅读过,但是只是停留在理解的层面上,想要把每个例子跑通也需要一定的折腾。
77

8-
注:每个示例都是一个单独的project
8+
注:每个示例都是一个单独的Maven Project
99

1010
## 1. Spring之旅
1111

@@ -15,7 +15,7 @@
1515
* spring容器
1616
* Spring还有很多值得学习的框架,如安全
1717

18-
**跑起来√**[knights](https://github.com/vonzhou/SpringInAction3/tree/master/knights/src/main/java/com/vonzhou/springinaction/knights)
18+
**跑起来√** [knights](https://github.com/vonzhou/SpringInAction3/tree/master/knights/src/main/java/com/vonzhou/springinaction/knights)
1919

2020
## 2. 装配Bean
2121

@@ -24,7 +24,7 @@
2424
* 内部bean适用于setter注入和构造器注入,内部bean不能被复用
2525
* SpEL表达式
2626

27-
**跑起来√**[springidol](https://github.com/vonzhou/SpringInAction3/tree/master/springidol)
27+
**跑起来√** [springidol](https://github.com/vonzhou/SpringInAction3/tree/master/springidol)
2828

2929
## 3. 最小化Spring XML配置
3030

@@ -35,7 +35,7 @@
3535
* \<context:component-scan> 配置自动扫描
3636
* 在基于Java的配置中使用@Configuration注解的Java类,等价于XML配置中的\<beans>元素
3737

38-
**跑起来√**[springidol-autodiscovery](https://github.com/vonzhou/SpringInAction3/tree/master/springidol-autodiscovery)
38+
**跑起来√** [springidol-autodiscovery](https://github.com/vonzhou/SpringInAction3/tree/master/springidol-autodiscovery)
3939

4040
## 4. 面向切面Spring
4141

@@ -46,9 +46,9 @@
4646
* introduction为已有的接口引入新接口
4747
* at aspect
4848

49-
**跑起来√**[springidol-aop](https://github.com/vonzhou/SpringInAction3/tree/master/springidol-aop)
49+
**跑起来√** [springidol-aop](https://github.com/vonzhou/SpringInAction3/tree/master/springidol-aop)
5050

51-
**跑起来√**[springidol-aspectj](https://github.com/vonzhou/SpringInAction3/tree/master/springidol-aspectj)
51+
**跑起来√** [springidol-aspectj](https://github.com/vonzhou/SpringInAction3/tree/master/springidol-aspectj)
5252

5353
## 5. 征服数据库
5454

@@ -57,13 +57,13 @@
5757
* 使用MySQL数据库
5858
* 体会各种持久化方法的使用
5959

60-
**跑起来√**[spitter-persistence-jdbc-conventional](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-jdbc-conventional)
60+
**跑起来√** [spitter-persistence-jdbc-conventional](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-jdbc-conventional)
6161

62-
**跑起来√**[spitter-persistence-jdbc-template](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-jdbc-template)
62+
**跑起来√** [spitter-persistence-jdbc-template](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-jdbc-template)
6363

64-
**跑起来√**[spitter-persistence-hibernate-contextual-session](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-hibernate-contextual-session)
64+
**跑起来√** [spitter-persistence-hibernate-contextual-session](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-hibernate-contextual-session)
6565

66-
**跑起来√**[spitter-persistence-jpa](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-jpa)
66+
**跑起来√** [spitter-persistence-jpa](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-persistence-jpa)
6767

6868
## 6. 事务管理
6969

@@ -73,9 +73,9 @@
7373
* 要理解JDBC事务,Hibernate事务幕后的实现
7474
* 声明式事务的5个属性:传播行为,隔离级别,只读,超时,回滚规则
7575

76-
**跑起来√**[spitter-service-declarative-tx](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-service-declarative-tx)
76+
**跑起来√** [spitter-service-declarative-tx](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-service-declarative-tx)
7777

78-
**跑起来√**[spitter-service-programmatic-tx](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-service-programmatic-tx)
78+
**跑起来√** [spitter-service-programmatic-tx](https://github.com/vonzhou/SpringInAction3/tree/master/spitter-service-programmatic-tx)
7979

8080
## 7. 使用Spring MVC构建Web应用程序
8181

@@ -327,21 +327,58 @@ org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 96; cvc-complex-type
327327
## 12. Spring消息
328328

329329
* 之前在阿里实习的时候,对RocketMQ有过较为深入的阅读
330-
*
330+
* ActiveMQ的使用,先要下载,启动broker,作为消息生产者消费者之间的代理
331+
332+
![](activemq-start.jpg)
333+
334+
* This class is not trusted to be serialized as ObjectMessage payload. 使用ObjectMessage的时候需要设置信任的package
335+
336+
```java
337+
Caused by: java.lang.ClassNotFoundException: Forbidden class org.springframework.remoting.support.RemoteInvocation! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes.
338+
at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.checkSecurity(ClassLoadingAwareObjectInputStream.java:112)
339+
at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:57)
340+
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1613)
341+
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
342+
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
343+
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
344+
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
345+
at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:206)
346+
... 14 more
347+
```
348+
349+
简单起见设置为:
350+
351+
```java
352+
System.setProperty("org.apache.activemq.SERIALIZABLE_PACKAGES","*");
353+
```
354+
355+
356+
**参阅学习:**
357+
358+
[ActiveMQ ObjectMessage](http://activemq.apache.org/objectmessage.html)
359+
360+
**跑起来√** [messaging](messaging)
331361

332362

363+
## 13. 将Spring Bean导出为MBean
333364

365+
* 前提是理解JMX,看文档
334366

367+
## 14. 其他Spring技巧
335368

369+
* 将一些需要修改的配置细节外部化一个单独的配置文件,系统文件,或环境变量中
370+
* JavaMailSender
371+
* 调度任务
336372

337373

338-
## TODO
374+
## 迷失
339375

340-
开启阅读 Oracle 的java文档 & coding
376+
![](lost.jpg)
341377

342-
[The Java™ Tutorials](https://docs.oracle.com/javase/tutorial/)
343378

344-
如何发布一个jar到maven仓库中test
379+
> Spring旅程才刚刚开始!
380+
>
381+
> vonzhou 2015.4.26
345382

346383

347384

activemq-start.jpg

131 KB
Loading

lost.jpg

148 KB
Loading

messaging/.idea/compiler.xml

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__junit_junit_3_8_1.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_apache_activemq_activemq_all_5_13_2.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_aop_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_beans_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_context_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_core_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_expression_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_jms_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_messaging_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

messaging/.idea/libraries/Maven__org_springframework_spring_tx_4_2_5_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)