1、Tomcat容器内启动

pom.xml 文件中

<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.ini</include>
</includes>
<filtering>false</filtering>
</resource>
</resources> <plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<port>8081</port>
<path>/</path>
<useBodyEncodingForURI>true</useBodyEncodingForURI>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin> <plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
</plugins> </build>

  

2、Main主线程运行

	public static void main(String[] args) throws Exception {

		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
new String[] {"classpath:spring/spring-context.xml"});
context.start();
// press any key to exit
System.in.read();
}

  

3、通过dubbo内置main打包成jar包运行

dubbo的三种运行方式的更多相关文章

  1. Windows下图文详解PHP三种运行方式(php_mod、cgi、fastcgi)

    PHP能不能成功的在Apache服务器上运行,就看我们如何去配置PHP的运行方式.PHP运行目前为止主要有三种方式: a.以模块加载的方式运行,初学者可能不容易理解,其实就是将PHP集成到Apache ...

  2. PHP三种运行方式(转载)

    三种运行方式:mod_php5.cgi.fast-cgi 1. 通过HTTPServer内置的模块来实现, 例如Apache的mod_php5,类似的Apache内置的mod_perl可以对perl支 ...

  3. Window下PHP三种运行方式图文详解,window下的php是不是单进程的?

    Window下PHP三种运行方式图文详解,window下的php是不是单进程的? PHP运行目前为止主要有三种方式: a.以模块加载的方式运行,初学者可能不容易理解,其实就是将PHP集成到Apache ...

  4. 0617Python-介绍、三种运行方式、变量、标识符和关键字、获取属性

    一.什么是自动化测试? 1.定义 自动:让机器自己动,就是自动 自动化:让机器按照人类的要求,把软件的所有功能遍历一遍 2.传统测试和自动化测试的区别 传统测试:繁琐.机械.门槛低.工资低 自动化测试 ...

  5. Dubbo的三种连接方式

    1.采用zookeeper作为注册中心 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...

  6. mybatis generatorConfig.xml生成配置文件及三种运行方式

    https://blog.csdn.net/gavin5033/article/details/83002335 一 ,cmd命令执行配置文件本人工作目录结构(图一) 在自己放配置文件的目录下新建ge ...

  7. Maven web项目三种运行方式

    http://www.micmiu.com/software/build/maven-web-eclipse-deploy/

  8. springboot与dubbo整合入门(三种方式)

    Springboot与Dubbo整合三种方式详解 整合环境: jdk:8.0 dubbo:2.6.2 springboot:2.1.5 项目结构: 1.搭建项目环境: (1)创建父项目与三个子项目,创 ...

  9. php-fpm 三种运行模式

    php-fpm配置 配置文件:php-fpm.conf 开启慢日志功能的: slowlog = /usr/local/var/log/php-fpm.log.slowrequest_slowlog_t ...

随机推荐

  1. centos6.6安装hadoop-2.5.0(一、本地模式安装)

    操作系统:centos6.6(一台服务器) 环境:selinux disabled:iptables off:java 1.8.0_131 安装包:hadoop-2.5.0.tar.gz hadoop ...

  2. ChinaCock界面控件介绍-CCSystemBar

    Android 4.4之后谷歌提供了沉浸式全屏体验, 在沉浸式全屏模式下, 状态栏. 虚拟按键动态隐藏, 应用可以使用完整的屏幕空间, 按照 Google 的说法, 给用户一种 身临其境 的体验.而A ...

  3. git 实现提交远程分支步骤

    git clone git branch [分支名] 创建分支 git branch 查看本地所有分支 git checkout [分支名称] 切换分支 ---写代码--- git status (查 ...

  4. Python socketserver ftp功能简单讲解

    socketserver模块实现并发 为什么要讲socketserver?我们之前写的tcp协议的socket是不是一次只能和一个客户端通信,如果用socketserver可以实现和多个客户端通信.它 ...

  5. 使用json通过telegraf生成metrics(摘自telegraf github文档)

    JSON: The JSON data format flattens JSON into metric fields. NOTE: Only numerical values are convert ...

  6. ORA-00600: internal error code, arguments: [kole_t2u], [34]

    数据库版本10.2.0.5,Alert 日志存在ORA-600报错 ORA-00600: internal error code, arguments: [kole_t2u], [34], [] -- ...

  7. 【leetcode】121-Best Time to Buy and Sell Stock

    problem 121. Best Time to Buy and Sell Stock code class Solution { public: int maxProfit(vector<i ...

  8. linux lamp编译环境安装

    apache 安装:http://blog.csdn.net/wplblog/article/details/52172128 编译安装 mysql安装:http://www.centoscn.com ...

  9. 03 重定向,请求转发,cookie,session

    重定向: /* 之前的写法 response.setStatus(302); response.setHeader("Location", "login_success. ...

  10. PS学习之餐饮行业修图

    素材 红烧肉 生菜 洋葱 目标效果 开始操作: 首先打开PS,将红烧肉素材放入  将红烧肉单另扣下来(用快随选择工具 按住Alt键是减选  抠图时  将画布放大 细细的扣) 然后创建一个和当前选区大小 ...