提交 a214a413 编写于 作者: W wizardforcel

2020-06-09 11:10:54

上级 156d5275
......@@ -31,13 +31,13 @@ Table of Contents
使用抽象工厂模式参与全球汽车工厂设计的课程的类图。
[![Abstract factory design pattern package diagram](img/539d4a4d7d62c886a580fcd475ecbefe.png "Abstract_factory_package_diagram")](https://howtodoinjava.files.wordpress.com/2012/10/abstract_fctory_package_diagram.png)
![Abstract factory design pattern package diagram](img/539d4a4d7d62c886a580fcd475ecbefe.png "Abstract_factory_package_diagram")
#### 2.2 顺序图
此图显示了`CarFactory`工厂类背后的类与抽象之间的交互。
[![abstract factory design pattern sequence diagram](img/c286c02b656fba6998b4a6eedd022cd2.png "abstract_factory_sequence_diagram")](https://howtodoinjava.files.wordpress.com/2012/10/abstract_factory_sequence_diagram.png)
![abstract factory design pattern sequence diagram](img/c286c02b656fba6998b4a6eedd022cd2.png "abstract_factory_sequence_diagram")
> 请注意,我已设计解决方案以完全隐藏最终用户的位置详细信息。 因此,我没有直接暴露任何特定于位置的工厂。
>
......
......@@ -42,7 +42,7 @@ Reference implementations in JDK
**3)客户端**:请求的始发者,它将访问处理程序来处理它。
[![Participants in chain of responsibility](img/2d4b87b6740e026b5215c34cf1862ac9.png)](https://howtodoinjava.files.wordpress.com/2013/04/participants_of_chain_of_responsibility.gif)
![Participants in chain of responsibility](img/2d4b87b6740e026b5215c34cf1862ac9.png)
Participants in chain of responsibility
......@@ -66,7 +66,7 @@ Support desk > supervisor > manager > director
我已经绘制了解决方案中涉及的所有实体的结构,如下所示。
[![Chain of responsibility class diagram](img/a35cefc3fab929568a2a2c1a666bd250.png)](https://howtodoinjava.files.wordpress.com/2013/04/chainofresponsibility_classdiagram.png)
![Chain of responsibility class diagram](img/a35cefc3fab929568a2a2c1a666bd250.png)
Support service system : class diagram
......
......@@ -75,7 +75,7 @@ else If(buttonName.equals(“Fan”))
#### 类图
[![Class Diagram](img/9ec819f9f1332ed80df50bd0356b0724.png)](//howtodoinjava.com/wp-content/uploads/2017/06/CommandPatternClassDiagram.jpg)
![Class Diagram](img/9ec819f9f1332ed80df50bd0356b0724.png)
Command Pattern Class Diagram
......
......@@ -205,7 +205,7 @@ Spring 框架中`bean configuration`原理的经典用法。
在 spring 框架中,所有模块都作为单独的组件提供,可以通过简单地将依赖注入到其他模块中来一起工作。 此依赖关系在 XML 文件中从外部进行管理。
这些独立的组件在边界上封闭得非常好,以至于我们可以轻松地在弹簧之外的其他软件模块中使用它们。 这已经通过依赖倒置和开放封闭原则来实现。 所有模块仅公开抽象,这对于扩展功能或另一个模块中的插件很有用。
这些独立的组件在边界上封闭得非常好,以至于我们可以轻松地在Spring之外的其他软件模块中使用它们。 这已经通过依赖倒置和开放封闭原则来实现。 所有模块仅公开抽象,这对于扩展功能或另一个模块中的插件很有用。
这些是**五类设计原则**,也称为 **SOLID 原则**,这是设计应用类别时应遵循的最佳实践。
......
......@@ -4,7 +4,7 @@
如果您正在基于 [**Spring**](//howtodoinjava.com/java-spring-framework-tutorials/ "Spring Tutorials")[**休眠**](//howtodoinjava.com/hibernate-tutorials/ "Hibernate Tutorials")[**JPA**](//howtodoinjava.com/category/frameworks/jpa/ "JPA") 构建的项目中 ,并且您想对其数据访问层(DAO)进行单元测试,那么本教程中提供的信息可能会对您有所帮助。 当我们要测试 DAO 层时,我们也需要访问数据库。 但是由于某些原因,可能会损坏测试数据(主要是为集成测试准备的),或者由于某些其他团队成员也需要访问该数据,所以可能由于某些原因而不允许您使用任何现有数据库。 为了解决此问题,我正在使用 [**内存数据库**](//howtodoinjava.com/hibernate/hibernate-4-using-in-memory-database-with-hibernate/ "Hibernate 4 : Using In-memory Database With Hibernate") 。 IM(内存中)数据库是个不错的选择,因为它不会留下任何回溯,并且您可以确保在每次测试之前都会得到空表(通常是一个好习惯)。
[![Unit-test-dao-layer](img/adb2235b58af10da70a942cb74fa1bf5.png)](//howtodoinjava.com/wp-content/uploads/2015/04/Unit-test-dao-layer.jpg)
![Unit-test-dao-layer](img/adb2235b58af10da70a942cb74fa1bf5.png)
> 一个好的单元测试应该保持数据库状态与测试用例执行之前的状态相同。 它应该删除所有添加的数据; 并回滚所有更新。
......@@ -103,7 +103,7 @@ Table of Contents
## 2)编写 DAO 层的单元测试
下一部分将编写 [**junit**](//howtodoinjava.com/junit/ "JUnit Tutorials") (或任何其他框架)测试用例。 我正在使用[弹簧测试](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/testing.html "spring test")模块。 您可以按照以下方式编写测试用例。
下一部分将编写 [**junit**](//howtodoinjava.com/junit/ "JUnit Tutorials") (或任何其他框架)测试用例。 我正在使用[Spring测试](https://docs.spring.io/spring/docs/current/spring-framework-reference/html/testing.html "spring test")模块。 您可以按照以下方式编写测试用例。
```java
package com.jpa.demo.test;
......
......@@ -38,7 +38,7 @@ Document all exceptions in your application in javadoc
## 1\. Java 中的异常类型
[![Exception Hierarchy in java](img/5158983de0e9a2c65c42d01b42206a00.png "Exception Hierarchy in java")](https://howtodoinjava.files.wordpress.com/2013/04/exceptionhierarchy3.png)
![Exception Hierarchy in java](img/5158983de0e9a2c65c42d01b42206a00.png "Exception Hierarchy in java")
Exception Hierarchy in java
......
......@@ -186,7 +186,7 @@ Spring 允许 bean 使用两种类型的标识符。 使用属性“ id”或“
另外,当您开始调试一些复杂的问题时,所有在配置文件中的所有信息实际上都会有很大帮助。 自动装配使调试更加困难。
> 了解更多:[弹簧自动接线](//howtodoinjava.com/2013/05/08/spring-beans-autowiring-concepts/ "Spring beans autowiring concepts")
> 了解更多:[Spring自动接线](//howtodoinjava.com/2013/05/08/spring-beans-autowiring-concepts/ "Spring beans autowiring concepts")
## 10)始终使用 classpath 前缀
......
......@@ -325,7 +325,7 @@ public class CalendarServlet extends HttpServlet {
当您在 tomcat 中的 servlet 上方运行并在浏览器中访问 URL“ *http:// localhost:8080 / servletexamples / CalendarServlet* ”时,将得到以下响应。
[![dynamic content in servlet](img/f1587c9576277355f3796da26d79564a.png)](//howtodoinjava.com/wp-content/uploads/2014/12/dynamic-content-in-servlet.png)
![dynamic content in servlet](img/f1587c9576277355f3796da26d79564a.png)
## 处理 Servlet 请求和响应
......
......@@ -40,7 +40,7 @@ DELETE e1 FROM EMPLOYEE e1, EMPLOYEE e2 WHERE e1.name = e2.name AND e1.id > e2.i
上面的 sql 查询将删除名称字段重复的行,并且仅保留**名称唯一且 ID 字段最低的**唯一行。 例如,ID 为 5 和 6 的行将被删除,而 ID 为 1 和 2 的行将被保留。
[![delete-duplicate-rows-in-mysql](img/47ddfb39186adc25818486adfab58c83.png)](https://howtodoinjava.files.wordpress.com/2013/01/delete-duplicate-rows-in-mysql.png)
![delete-duplicate-rows-in-mysql](img/47ddfb39186adc25818486adfab58c83.png)
*如果要保留具有最新生成的 ID 值的行,则将 where 子句中的条件反转为 e1.id < e2.id,如下所示:*
......
......@@ -2,7 +2,7 @@
> 原文: [https://howtodoinjava.com/struts2/struts-2-hello-world-example-application/](https://howtodoinjava.com/struts2/struts-2-hello-world-example-application/)
在我以前的文章中,我写了许多关于 [**JAX-RS RESTEasy**](//howtodoinjava.com/restful-web-service/ "resteasy tutorials")[**Spring 3**](//howtodoinjava.com "spring 3 tutorials")[**的示例和教程 ] Hibernate**](//howtodoinjava.com/hibernate-tutorials/ "hibernate tutorials") 和其他 Java 框架,例如 [**专家**](//howtodoinjava.com/maven/ "maven tutorials")[**junit**](//howtodoinjava.com/junit/ "junit tutorials") 。 我也有很多要求在 **struts 2** 上写一些东西。 好吧,这里我从世界示例开始。 在下一篇文章中,我将尝试涵盖涉及 Struts 2 的最大领域和概念。因此,请继续关注。
在我以前的文章中,我写了许多关于 [**JAX-RS RESTEasy**](//howtodoinjava.com/restful-web-service/ "resteasy tutorials")[**Spring3**](//howtodoinjava.com "Spring3 tutorials")[**的示例和教程 ] Hibernate**](//howtodoinjava.com/hibernate-tutorials/ "hibernate tutorials") 和其他 Java 框架,例如 [**专家**](//howtodoinjava.com/maven/ "maven tutorials")[**junit**](//howtodoinjava.com/junit/ "junit tutorials") 。 我也有很多要求在 **struts 2** 上写一些东西。 好吧,这里我从世界示例开始。 在下一篇文章中,我将尝试涵盖涉及 Struts 2 的最大领域和概念。因此,请继续关注。
```java
Sections in this post:
......
......@@ -2,7 +2,7 @@
> 原文: [https://howtodoinjava.com/struts2/struts-2-hello-world-with-annotations/](https://howtodoinjava.com/struts2/struts-2-hello-world-with-annotations/)
在我以前的文章中,我写了许多关于 [**JAX-RS RESTEasy**](//howtodoinjava.com/restful-web-service/ "RESTful Web services Tutorials")[**Spring 3**](//howtodoinjava.com "Spring 3 Tutorials")[**的示例和教程 ] Hibernate**](//howtodoinjava.com/hibernate-tutorials/ "Hibernate Tutorials") 和其他 Java 框架,例如 [**专家**](//howtodoinjava.com/maven/ "Maven Tutorials")[**junit** **4**](//howtodoinjava.com/junit/ "JUnit Tutorials") 。 我还在与 [**Struts 2 hello world 和 xml 配置**](//howtodoinjava.com/struts-2/struts-2-hello-world-example-application/ "Struts 2 hello world example application") 相关的帖子中写道。 在本文中,我将更新先前的示例,以使用注释来配置 struts 2 应用。
在我以前的文章中,我写了许多关于 [**JAX-RS RESTEasy**](//howtodoinjava.com/restful-web-service/ "RESTful Web services Tutorials")[**Spring3**](//howtodoinjava.com "Spring3 Tutorials")[**的示例和教程 ] Hibernate**](//howtodoinjava.com/hibernate-tutorials/ "Hibernate Tutorials") 和其他 Java 框架,例如 [**专家**](//howtodoinjava.com/maven/ "Maven Tutorials")[**junit** **4**](//howtodoinjava.com/junit/ "JUnit Tutorials") 。 我还在与 [**Struts 2 hello world 和 xml 配置**](//howtodoinjava.com/struts-2/struts-2-hello-world-example-application/ "Struts 2 hello world example application") 相关的帖子中写道。 在本文中,我将更新先前的示例,以使用注释来配置 struts 2 应用。
有关信息,struts 批注是 [**struts 常规插件**](https://struts.apache.org/docs/convention-plugin.html "struts 2 convention plugin") 的一部分。
......
......@@ -2,7 +2,7 @@
> 原文: [https://howtodoinjava.com/struts2/spring-4-struts-2-hibernate-integration-tutorial/](https://howtodoinjava.com/struts2/spring-4-struts-2-hibernate-integration-tutorial/)
以前,我已经介绍了 [**spring 3 +休眠集成**](//howtodoinjava.com/spring/spring-orm/spring-3-and-hibernate-integration-tutorial-with-example/ "Spring 3 and hibernate integration tutorial with example") 示例和 [**struts 2 hello world**](//howtodoinjava.com/struts-2/struts-2-hello-world-example-application/ "Struts 2 hello world example application") 示例。 在本教程中,我将讨论将 spring 框架与 Struts 和 Hibernate 结合使用时要记住的所有重要点。 另外,请注意,本教程使用了其他次要但很重要的概念,例如日志记录,TLD 的使用和事​​务以及已集成到本教程中。 因此,请记住还要检查其详细信息。
以前,我已经介绍了 [**Spring3 +休眠集成**](//howtodoinjava.com/spring/spring-orm/spring-3-and-hibernate-integration-tutorial-with-example/ "Spring3 and hibernate integration tutorial with example") 示例和 [**struts 2 hello world**](//howtodoinjava.com/struts-2/struts-2-hello-world-example-application/ "Struts 2 hello world example application") 示例。 在本教程中,我将讨论将 spring 框架与 Struts 和 Hibernate 结合使用时要记住的所有重要点。 另外,请注意,本教程使用了其他次要但很重要的概念,例如日志记录,TLD 的使用和事​​务以及已集成到本教程中。 因此,请记住还要检查其详细信息。
在本教程中,我将使用简单的功能(例如全部获取,添加和删除)来构建员工管理屏幕。 它看起来像这样:
......
......@@ -51,7 +51,7 @@ Java 规范说 Java 中的 ***都是按值传递*** 。 在 Java 中,没有“
在 Java 中,当我们将复杂类型的引用作为任何方法参数传递时,总是将内存地址一点一点地复制到新的引用变量中。 见下图:
[![pass-by-value](img/bf3729e69335a6b034e3817adb89a5d0.png)](https://howtodoinjava.files.wordpress.com/2013/03/pass-by-value.jpg)
![pass-by-value](img/bf3729e69335a6b034e3817adb89a5d0.png)
在上面的示例中,第一个实例的地址位被复制到另一个引用变量,因此导致两个引用都指向存储实际对象的单个存储位置。 请记住,再次引用 null 不会使第一次引用也为 null。 但是,从任一参考变量更改状态也会对其他参考产生影响。
......
# HornetQ 独立存在 – 基本的 JMS 消息传递示例
# HornetQ 单体 – 基本的 JMS 消息传递示例
> 原文: [https://howtodoinjava.com/hornetq/basic-jms-messaging-example-using-hornetq-stand-alone-server/](https://howtodoinjava.com/hornetq/basic-jms-messaging-example-using-hornetq-stand-alone-server/)
[**HornetQ**](http://hornetq.jboss.org "hornetq") 是一个开放源代码项目,旨在构建多协议,可嵌入,非常高性能的集群异步消息传递系统。 HornetQ 支持 JMS 1.1 API,并且还定义了自己的消息传递 API,以实现最佳性能和灵活性。 HornetQ 一流的高性能日志以非持久消息传递通常看到的速度提供持久消息传递性能。 HornetQ 提供服务器复制和自动客户端故障转移功能,以消除服务器故障时丢失或重复的消息。
在上一篇文章中,我们了解了有关配置 [**独立 hornetq 服务器和基本配置**](//howtodoinjava.com/hornetq/hornetq-stand-alone-server-example-using-maven/) 的信息。 让我们继续举例。
在上一篇文章中,我们了解了有关配置[**独立 hornetq 服务器和基本配置**](//howtodoinjava.com/hornetq/hornetq-stand-alone-server-example-using-maven/)的信息。 让我们继续举例。
在本文中,我们将学习将 JMS 消息发送到 hornetq 服务器上的队列的机制,然后检索这些消息。
**步骤 1)**使用以下命令创建一个 maven 项目并将其转换为 Eclipse Java 项目
步骤 1)使用以下命令创建一个 maven 项目并将其转换为 Eclipse Java 项目
```java
mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorld
......@@ -19,9 +19,9 @@ mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorl
mvn eclipse:eclipse
```
**步骤 2)**更新 pom.xml 文件并更新项目依赖项
步骤 2)更新`pom.xml`文件并更新项目依赖项
**pom.xml**
**`pom.xml`**
```java
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -81,9 +81,9 @@ mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorl
```
**步骤 3)**将基本的 hornetq 配置文件放在类路径中。
步骤 3)将基本的 hornetq 配置文件放在类路径中。
**hornetq-configuration.xml**
**`hornetq-configuration.xml`**
```java
<?xml version="1.0"?>
......@@ -106,9 +106,9 @@ mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorl
```
**步骤 4)**配置连接器工厂,并将配置文件放置在 classpath 中。
步骤 4)配置连接器工厂,并将配置文件放置在`classpath`中。
**hornetq-jms.xml**
**`hornetq-jms.xml`**
```java
<?xml version="1.0"?>
......@@ -130,9 +130,9 @@ mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorl
```
**步骤 5)**启动服务器并测试消息传递代码
步骤 5)启动服务器并测试消息传递代码
**HornetQMessageQueueDemo.java**
**`HornetQMessageQueueDemo.java`**
```java
package com.howtodoinjava;
......
......@@ -6,7 +6,7 @@
在这篇文章中,我们将学习将 hornetq 服务器作为独立服务器运行的最基本配置,即在诸如 jboss 之类的任何容器之外运行。
**步骤 1)**使用以下命令创建一个 maven 项目并将其转换为 Eclipse Java 项目
步骤 1)使用以下命令创建一个 maven 项目并将其转换为 Eclipse Java 项目
```java
mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorld
......@@ -17,9 +17,9 @@ mvn archetype:generate -DgroupId=com.howtodoinjava -DartifactId=HornetQHelloWorl
mvn eclipse:eclipse
```
**步骤 2)**更新 pom.xml 文件并更新项目依赖项
步骤 2)更新`pom.xml`文件并更新项目依赖项
**pom.xml**
**`pom.xml`**
```java
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -77,9 +77,9 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLS
```
**步骤 3)**将基本的 hornetq 配置文件放在类路径中。
步骤 3)将基本的 hornetq 配置文件放在类路径中。
**hornetq-configuration.xml**
**`hornetq-configuration.xml`**
```java
< ?xml version="1.0"?>
......
# Spring 3 Hornetq 独立集成示例
# Spring3 Hornetq 独立集成示例
> 原文: [https://howtodoinjava.com/hornetq/spring-3-hornetq-standalone-integration-example/](https://howtodoinjava.com/hornetq/spring-3-hornetq-standalone-integration-example/)
[**HornetQ**](http://hornetq.jboss.org "hornetq") 是一个开放源代码项目,旨在构建多协议,可嵌入,非常高性能的集群异步消息传递系统。 到目前为止,我们已经了解了 [**配置 hornetq 独立服务器**](//howtodoinjava.com/hornetq/hornetq-stand-alone-server-example-using-maven/ "Hornetq stand alone server example using maven")[**设置基本消息传递功能**](//howtodoinjava.com/hornetq/basic-jms-messaging-example-using-hornetq-stand-alone-server/ "Basic jms messaging example using hornetq stand alone server") 的示例。 HornetQ 具有很大的灵活性,可以通过一些现有的应用框架进行配置。 在此序列中,我将展示 HornetQ 在 [**Spring 3**](//howtodoinjava.com "spring 3 tutorials") 中的用法。
[**HornetQ**](http://hornetq.jboss.org "hornetq") 是一个开放源代码项目,旨在构建多协议,可嵌入,非常高性能的集群异步消息传递系统。 到目前为止,我们已经了解了[**配置 hornetq 独立服务器**](//howtodoinjava.com/hornetq/hornetq-stand-alone-server-example-using-maven/ "Hornetq stand alone server example using maven")[**设置基本消息传递功能**](//howtodoinjava.com/hornetq/basic-jms-messaging-example-using-hornetq-stand-alone-server/ "Basic jms messaging example using hornetq stand alone server")的示例。 HornetQ 具有很大的灵活性,可以通过一些现有的应用框架进行配置。 在此序列中,我将展示 HornetQ 在 [**Spring3**](//howtodoinjava.com "Spring3 tutorials") 中的用法。
让我们逐步进行所有设置。
步骤 1)[创建一个 Maven 项目](//howtodoinjava.com/maven/create-a-simple-java-project-using-maven/ "Create a simple java project using maven")并将其转换为 Eclipse Java 项目。
步骤 2)使用 Spring 3 和 hornetq 依赖项更新 maven 存储库。
步骤 2)使用 Spring3 和 hornetq 依赖项更新 maven 存储库。
```java
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -241,14 +241,14 @@
```
步骤 3)在 lib 文件夹中添加两个其他 jar。 如果时间允许,请找到它们的 Maven 依赖项并添加 pom.xml
步骤 3)在`lib`文件夹中添加两个其他 jar。 如果时间允许,请找到它们的 Maven 依赖项并添加`pom.xml`
* jnpserver-5.0.3.GA.jar
* org.springframework.jms-3.0.5.RELEASE.jar
* `jnpserver-5.0.3.GA.jar`
* `org.springframework.jms-3.0.5.RELEASE.jar`
步骤 4)从 jboss 发行版复制以下文件,并将其放在类路径中。 或者,只需复制下面给出的文件。
**hornetq-configuration.xml**
**`hornetq-configuration.xml`**
```java
<configuration xmlns="urn:hornetq"
......@@ -300,7 +300,7 @@
```
**hornetq-jms.xml**
**`hornetq-jms.xml`**
```java
<configuration xmlns="urn:hornetq"
......@@ -328,7 +328,7 @@
```
**hornetq-users.xml**
**`hornetq-users.xml`**
```java
<configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -341,7 +341,7 @@
```
步骤 5)在类路径中复制 jndi.properties
步骤 5)在类路径中复制`jndi.properties`
```java
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
......@@ -366,9 +366,9 @@ log4j.category.org.hornetq=INFO
log4j.category.org.springframework=INFO
```
步骤 7)到目前为止,已经配置了 hornetq 服务器和 jndi。 现在,将它们插入 spring.xml 和 spring.properties 中的 spring 框架。
步骤 7)到目前为止,已经配置了 hornetq 服务器和 jndi。 现在,将它们插入`spring.xml``spring.properties`中的 spring 框架。
**spring.xml**
**`spring.xml`**
```java
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
......@@ -445,16 +445,16 @@ log4j.category.org.springframework=INFO
```
**spring.properties**
**`spring.properties`**
```java
hornetq.data.dir=${hornetq.spring.examples.home}/hornetq-data
org.hornetq.logger-delegate-factory-class-name=org.hornetq.integration.logging.Log4jLogDelegateFactory
```
步骤 8)首先加载弹簧容器。 它还将验证我们所有的配置文件。
步骤 8)首先加载 Spring 容器。 它还将验证我们所有的配置文件。
**SpringContainerLoader.java**
**`SpringContainerLoader.java`**
```java
package com.howtodoinjava.hornetq.demo;
......@@ -477,7 +477,7 @@ public class SpringContainerLoader
步骤 8)现在,我将编写消息生产者和消息使用者客户端。
**MessageProducerClient.java**
**`MessageProducerClient.java`**
```java
package com.howtodoinjava.hornetq.demo;
......@@ -529,7 +529,7 @@ public class MessageProducerClient implements Runnable {
```
**MessageConsumerClient.java**
**`MessageConsumerClient.java`**
```java
package com.howtodoinjava.hornetq.demo;
......@@ -579,7 +579,7 @@ public class MessageConsumerClient implements Runnable {
步骤 9)现在该测试整个代码和消息传递功能了。
**HornetQMessagingTest.java**
**`HornetQMessagingTest.java`**
```java
package com.howtodoinjava.hornetq.demo;
......@@ -604,7 +604,7 @@ public class HornetQMessagingTest
```
在测试类之上运行会在下面生成日志,以验证 spring 3 和 hornetq 集成成功。
在测试类之上运行会在下面生成日志,以验证 Spring3 和 hornetq 集成成功。
```java
INFO | Refreshing org.springframework.context.support.FileSystemXmlApplicationContext@aa9835: startup date [Mon Mar 25 09:23:26 IST 2013]; root of context hierarchy
......@@ -641,8 +641,8 @@ TRACE | Received msg: HornetQMessage[ID:8e74da0e-94ff-11e2-bbba-002564ac1704:300
作为参考,我给出了目录结构的快照。
[![Spring 3 + hornetq standalone integration](img/813048193c1c4c327b87ccb10a624363.png)](https://howtodoinjava.files.wordpress.com/2013/03/spring-3-hornetq-standalone-integration.png)
![Spring3 + hornetq standalone integration](img/813048193c1c4c327b87ccb10a624363.png)
[**源代码下载**](https://docs.google.com/file/d/0B7yo2HclmjI4ME5IN3ZhNHU1Q1E/edit?usp=sharing "spring 3 hornetq integration source code download")
[**源代码下载**](https://docs.google.com/file/d/0B7yo2HclmjI4ME5IN3ZhNHU1Q1E/edit?usp=sharing "Spring3 hornetq integration source code download")
**祝您学习愉快!**
\ No newline at end of file
......@@ -414,7 +414,7 @@ Final Swagger2 REST API Output
这一切都将通过弹簧启动应用[swagger2] **创建 REST API 文档。 将我的问题放在评论部分。**
这一切都将通过Spring启动应用[swagger2] **创建 REST API 文档。 将我的问题放在评论部分。**
[Download Source code](//howtodoinjava.com/wp-content/uploads/2017/07/spring-boot-swagger2.zip)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册