plugin

Maven tomcat7-maven-plugin 部署Maven Web 项目

假装没事ソ 提交于 2019-11-29 02:58:11
1: 配置Tomcat Manager 用户: 重新解压缩了一个新的tomcat7, 打开Tomcat根目录下conf目录中的tomcat_user.xml,在<tomcat-users>节点下添加manager角色和用户,用于Tomcat Maven Plugin自动部署应用,xml代码如下: <tomcat-users> <role rolename="manager-gui"/> <role rolename="manager-script"/> <user username="alexgaoyh" password="alexgaoyh" roles="manager-gui, manager-script"/> <!-- 用户名和密码可以是其他字合法符串 --> </tomcat-users> 2: Maven配置中添加Tomcat Server 打开Maven的settings.xml文件,如果是本地安装版Maven,文件为安装根目录下conf/settings.xml,如果使用的是Eclipse内置的Maven,则该文件为当前系统用户目录下的/ .m2/setting.xml。在<servers>节点下配置Tomcat的Manager用户信息,xml代码如下: <servers> <server> <id>Tomcat7</id> <username

Mybatis源码概览(二) ---Plugin扩展与Spring结合原理

◇◆丶佛笑我妖孽 提交于 2019-11-28 10:21:33
本文主要介绍Mybatis通过动态代理避免对sqlSession直接调用,而是通过MapperProxy代理技术生成了具体dao接口的Mapper实例,里面封装了对sqlSession的调用;Mybatis预留了Interceptor接口,用户可以扩展该接口,实现自定义插件;Mybatis与Spring结合主要通过Spring 的FactoryBean技术实现; MapperProxy 把 Mybatis源码概览(一) 中的helloWorld例子的注释代码打开 如下 BlogDao mapper = session.getMapper(BlogDao.class); List<Blog> blogs= mapper.selectAll(); 这样通过session.getMapper获取某个Dao接口的Mapper代理实例,这样后面查询就不需要直接对sqlSession来操作,在具体应用中会省略掉很多代码。具体生产Mapper代理原理我们可以Debug一步一步分析。 第一加载解析Mybatis配置文件时 跟进代码,下面这个片段是解析Mybatis几大属性 其中最后有个mappers //XMLConfigBuilder类中 private void parseConfiguration(XNode root) { try { Properties settings =

在Openfire源码中添加自己的插件

一个人想着一个人 提交于 2019-11-28 09:51:28
参考: http://redhacker.iteye.com/blog/1919329 Openfire源码的编译请查看另一篇文章: Ubuntu12.04(64bit)上部署编译运行Openfire+Spark环境 一、基于 Openfire 源码安装自定义插件 创建自己的插件路径 编写 plugin.xml,注意路径,是创建在插件的根目录下。否则即使编译出jar包,管控平台也不识别。 这里偷懒直接在其他插件中复制过来的。 <? xml version="1.0" encoding="UTF-8"?> <plugin> <!--插件JAVA文件路径--> <class> org.jivesoftware.example.plugin.ExamplePlugin </class> <!-- Plugin meta-data --> <name>Example Plugin </name> <description>This is an example plugin .</description> <author> Jive Software</author> <version>1.0</version> <date>07/01/2006</date> <url> http://www.igniterealtime.org/projects/openfire/plugins.jsp<

Mybatis3.4.x技术内幕(十九):Mybatis之plugin插件设计原理

偶尔善良 提交于 2019-11-27 08:34:12
大多数框架,都支持插件,用户可通过编写插件来自行扩展功能,Mybatis也不例外。 我们从插件配置、插件编写、插件运行原理、插件注册与执行拦截的时机、初始化插件、分页插件的原理等六个方面展开阐述。 1. 插件配置 Mybatis的插件配置在configuration内部,初始化时,会读取这些插件,保存于Configuration对象的InterceptorChain中。 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <plugins> <plugin interceptor="com.mybatis3.interceptor.MyBatisInterceptor"> <property name="value" value="100" /> </plugin> </plugins> </configuration> public class Configuration { protected final InterceptorChain interceptorChain = new

【原创】RabbitMQ 之 HTTP server 插件(翻译)

穿精又带淫゛_ 提交于 2019-11-27 07:04:45
HTTP server plugin HTTP 服务器插件 The rabbitmq-mochiweb plugin provides hosting for other plugins that have HTTP interfaces. It allows these interfaces to co-exist on one or more HTTP listeners. rabbitmq-mochiweb 插件可以为其他拥有 HTTP 接口到插件提供 hosting 功能。允许这些接口并存与一个或者多个 HTTP listener。 Configuration 配置方式 Plugins using rabbit mq-mochiweb typically take a listener configuration item to configure their listening HTTP port. In this page we will give examples for the rabbitmq_management application, but the same configuration can be applied to rabbitmq_jsonrpc and rabbitmq_web_stomp_examples. 使用 rabbitmq

开发cordova下的wp8插件

末鹿安然 提交于 2019-11-27 06:49:17
1、创建cs文件 在VS中,右键项目,添加新建项,选择类,给这个类命名,我们就叫他Exit.cs吧。 2、编辑cs文件 在文件里包含下面内容,这是cordova和C#代码沟通的桥梁: using WPCordovaClassLib.Cordova; using WPCordovaClassLib.Cordova.Commands; using WPCordovaClassLib.Cordova.JSON; using System.Windows;//最后这一行是要退出应用所需要的,一般的插件不必包含 cs文件的主体内容: namespace myPlugins//命名空间自选 { public class Exit : BaseCommand//需要继承BaseCommand类,这里类名需要和文件名一致 { public void exitApp(string options) //用public声明方法,返回值为void,传入的参数为字符串的 { string optVal = null; try { optVal = JsonHelper.Deserialize<string[]>(options)[0]; //因为js传过来的值都经过json编码过的,这里需要解码 } catch (Exception) { //异常处理 } if (optVal == null) {

eclipse maven plugin 插件安装和配置

一笑奈何 提交于 2019-11-26 23:34:44
maven3 安装: 安装 Maven 之前要求先确定你的 JDK 已经安装配置完成。Maven是 Apache 下的一个项目,目前最新版本是 3.0.4,我用的也是这个。 首先去官网下载 Maven: http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.tar.gz 下载完成之后将其解压,我将解压后的文件夹重命名成 maven,并将它放在 D:\Server 目录下,即 maven 最终的路径是:D:\Server\maven 配置 maven 环境变量: 系统变量:MAVEN_HOME = D:\Server\maven 用户变量:path = %MAVEN_HOME%\bin 相信大家都有配过环境变量的,详细步骤就不说了,对着把属性名和属性值配上的OK了。 打开 cmd,在里面敲:mvn -version 如果能打印如上信息,说明到此 Maven3 已经在你的电脑上安装完成。 mvn 是 mavn 的一个指令,mvn -version 是查看版本信息,我的操作系统是 32位的 WIN7,安装的 maven 是 3.0.4 如果能打印如上信息,说明到此 Maven3 已经在你的电脑上安装完成。 修改 maven 仓库存放位置: 找到 maven 下的 conf 下的

【原创】RabbitMQ 之 Plugins(翻译)

橙三吉。 提交于 2019-11-26 19:04:23
为了方便工作中使用,对 RabbitMQ 的【插件】相关文档进行了翻译,鉴于自己水平有限,翻译中难免有纰漏产生,如果疑问,欢迎指出探讨。此文以中英对照方式呈现。 官方原文: http://www.rabbitmq.com/plugins.html ========== 我是分割线 ============= Plugins RabbitMQ supports a variety of plugins. This page documents the plugins that ship with RabbitMQ 3.0.1. RabbitMQ 支持许多插件。当前页面列出了 RabbitMQ 3.0.1 可用的插件。 To enable plugins, use the rabbitmq-plugins tool: 可以通过命令行工具 [ rabbitmq-plugins ] 使能插件 : rabbitmq-plugins enable plugin-name And to disable plugins again, use: 通过如下命令 去使能插件 : rabbitmq-plugins disable plugin-name You can see a list of which plugins are enabled with: 通过如下命令 查看 哪些插件被使能了: