• 大小: 27KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-16
  • 语言: 其他
  • 标签: jms  

资源简介

这个Demo程序演示了如何使用SpringBoot来构建一个最简单的基于ActiveMQ的JMS程序。

资源截图

代码片段和文件信息

package me.zebe.demo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.jms.core.JmsTemplate;

/**
 * 一个简单的JMS程序(ActiveMQ实现)
 * @author Zebe
 * @version 1.0.0
 */
@SpringBootApplication
public class JMSApplication implements CommandLineRunner {

    @Autowired
    JmsTemplate jmsTemplate;

    /**
     * 程序启动入口
     * @param args
     */
    public static void main(String[] args) {
        SpringApplication.run(JMSApplication.class args);
    }

    @Override
    public void run(String... strings) throws Exception {
        jmsTemplate.send(“my-destination“ new MsgSender());
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-10-02 15:51  springboot-jms-activemq-demo\
     目录           0  2016-10-02 16:25  springboot-jms-activemq-demo\.idea\
     文件        1232  2016-10-02 14:38  springboot-jms-activemq-demo\.idea\compiler.xml
     目录           0  2016-10-02 14:35  springboot-jms-activemq-demo\.idea\copyright\
     文件          76  2016-10-02 14:35  springboot-jms-activemq-demo\.idea\copyright\profiles_settings.xml
     文件         172  2016-10-02 14:38  springboot-jms-activemq-demo\.idea\encodings.xml
     目录           0  2016-10-02 14:59  springboot-jms-activemq-demo\.idea\libraries\
     文件         511  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml
     文件         565  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__ch_qos_logback_logback_classic_1_1_3.xml
     文件         544  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__ch_qos_logback_logback_core_1_1_3.xml
     文件         592  2016-10-02 14:59  springboot-jms-activemq-demo\.idea\libraries\Maven__org_apache_activemq_activemq_client_5_12_2.xml
     文件         735  2016-10-02 14:59  springboot-jms-activemq-demo\.idea\libraries\Maven__org_apache_geronimo_specs_geronimo_j2ee_management_1_1_spec_1_0_1.xml
     文件         651  2016-10-02 14:59  springboot-jms-activemq-demo\.idea\libraries\Maven__org_apache_geronimo_specs_geronimo_jms_1_1_spec_1_1_1.xml
     文件         534  2016-10-02 14:59  springboot-jms-activemq-demo\.idea\libraries\Maven__org_fusesource_hawtbuf_hawtbuf_1_11.xml
     文件         545  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_slf4j_jcl_over_slf4j_1_7_13.xml
     文件         531  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_slf4j_jul_to_slf4j_1_7_13.xml
     文件         559  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_slf4j_log4j_over_slf4j_1_7_13.xml
     文件         510  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_slf4j_slf4j_api_1_7_13.xml
     文件         633  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_boot_spring_boot_1_3_2_RELEASE.xml
     文件         731  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_boot_spring_boot_autoconfigure_1_3_2_RELEASE.xml
     文件         689  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_boot_spring_boot_starter_1_3_2_RELEASE.xml
     文件         745  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_boot_spring_boot_starter_logging_1_3_2_RELEASE.xml
     文件         606  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_aop_4_2_4_RELEASE.xml
     文件         620  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_beans_4_2_4_RELEASE.xml
     文件         634  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_context_4_2_4_RELEASE.xml
     文件         613  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_core_4_2_4_RELEASE.xml
     文件         655  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_expression_4_2_4_RELEASE.xml
     文件         606  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_jms_4_2_4_RELEASE.xml
     文件         648  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_messaging_4_2_4_RELEASE.xml
     文件         599  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_springframework_spring_tx_4_2_4_RELEASE.xml
     文件         492  2016-10-02 14:40  springboot-jms-activemq-demo\.idea\libraries\Maven__org_yaml_snakeyaml_1_16.xml
............此处省略19个文件信息

评论

共有 条评论