update md
This commit is contained in:
parent
86d6a14724
commit
4abdddc679
@ -3,9 +3,6 @@ weixin4j
|
|||||||
|
|
||||||
微信开发工具包
|
微信开发工具包
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
项目说明
|
|
||||||
-------
|
|
||||||
> `weixin4j`是一个用java编写针对微信开发的工具包,包含[weixin4j-mp](./weixin4j-mp)(微信公众平台API)、[weixin4j-qy](./weixin4j-qy)(微信企业号API)以及[weixin4j-server](./weixin4j-server)(微信被动消息服务器)三个工程.
|
> `weixin4j`是一个用java编写针对微信开发的工具包,包含[weixin4j-mp](./weixin4j-mp)(微信公众平台API)、[weixin4j-qy](./weixin4j-qy)(微信企业号API)以及[weixin4j-server](./weixin4j-server)(微信被动消息服务器)三个工程.
|
||||||
|
|
||||||
功能列表
|
功能列表
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.foxinmy</groupId>
|
<groupId>com.foxinmy</groupId>
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.foxinmy.weixin4j.type;
|
|||||||
/**
|
/**
|
||||||
* 上传的媒体类型</br>
|
* 上传的媒体类型</br>
|
||||||
* <p>
|
* <p>
|
||||||
* 公众平台上传限制:</br> 图片(image): 128K,支持JPG格式</br>
|
* 公众平台上传限制:</br> 图片(image): 128K,支持JPG,PNG格式</br>
|
||||||
* 语音(voice):256K,播放长度不超过60s,支持AMR\MP3格式</br> 视频(video):1MB,支持MP4格式</br>
|
* 语音(voice):256K,播放长度不超过60s,支持AMR\MP3格式</br> 视频(video):1MB,支持MP4格式</br>
|
||||||
* 缩略图(thumb):64KB,支持JPG格式</br>
|
* 缩略图(thumb):64KB,支持JPG格式</br>
|
||||||
* </p>
|
* </p>
|
||||||
|
|||||||
@ -31,21 +31,6 @@
|
|||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>${poi.version}</version>
|
<version>${poi.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>commons-codec</groupId>
|
|
||||||
<artifactId>commons-codec</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>dom4j</groupId>
|
|
||||||
<artifactId>dom4j</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-api</artifactId>
|
|
||||||
<version>${jcl.version}</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jaxen</groupId>
|
<groupId>jaxen</groupId>
|
||||||
|
|||||||
@ -1,323 +0,0 @@
|
|||||||
package com.foxinmy.weixin4j.mp.util;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.foxinmy.weixin4j.exception.PayException;
|
|
||||||
import com.foxinmy.weixin4j.http.XmlResult;
|
|
||||||
import com.foxinmy.weixin4j.model.Consts;
|
|
||||||
import com.foxinmy.weixin4j.mp.model.WeixinMpAccount;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.JsPayNotify;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.PayPackage;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.PayUtil;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.conver.CouponConverter;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v2.NativePayNotifyV2;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v2.NativePayResponseV2;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v2.PayFeedback;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v2.PayPackageV2;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v2.PayWarn;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v3.NativePayNotifyV3;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v3.NativePayResponseV3;
|
|
||||||
import com.foxinmy.weixin4j.mp.payment.v3.PayPackageV3;
|
|
||||||
import com.foxinmy.weixin4j.mp.type.TradeType;
|
|
||||||
import com.foxinmy.weixin4j.util.ConfigUtil;
|
|
||||||
import com.foxinmy.weixin4j.util.StringUtil;
|
|
||||||
import com.foxinmy.weixin4j.xml.XmlStream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 支付示例
|
|
||||||
*
|
|
||||||
* @className PayDemo
|
|
||||||
* @author jy
|
|
||||||
* @date 2014年10月28日
|
|
||||||
* @since JDK 1.7
|
|
||||||
* @see
|
|
||||||
*/
|
|
||||||
public final class PayDemo {
|
|
||||||
|
|
||||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
|
||||||
|
|
||||||
/**
|
|
||||||
* JSAPI支付
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public JSONObject jsPay() {
|
|
||||||
JSONObject obj = new JSONObject();
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
// V3 支付
|
|
||||||
PayPackage payPackage = new PayPackageV3(weixinAccount, "用户openid",
|
|
||||||
"商品描述", "系统内部订单号", 1d, "IP地址", TradeType.JSAPI);
|
|
||||||
// V2 支付
|
|
||||||
payPackage = new PayPackageV2("商品描述", weixinAccount.getPartnerId(),
|
|
||||||
"系统内部订单号", 1d, "回调地址", "IP地址");
|
|
||||||
payPackage.setAttach("ID");
|
|
||||||
String jspay = null;
|
|
||||||
try {
|
|
||||||
jspay = PayUtil.createPayJsRequestJson(payPackage, weixinAccount);
|
|
||||||
} catch (PayException e) {
|
|
||||||
log.error("create jspay error,{}", weixinAccount, e);
|
|
||||||
}
|
|
||||||
if (StringUtil.isBlank(jspay)) {
|
|
||||||
obj.put("code", "-2");
|
|
||||||
obj.put("msg", "创建支付链接失败!");
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
obj.put("code", "0");
|
|
||||||
obj.put("jspay", jspay);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 编辑收货地址 SnsToken token = (SnsToken) getSession("AccessToken");
|
|
||||||
* obj.put("editaddress", PayUtil.createAddressRequestJson(
|
|
||||||
* wx.getAppId(), getFullLoction(), token.getAccess_token()));
|
|
||||||
*/
|
|
||||||
log.info("js pay....{}", obj);
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* JSAPI(V2)支付成功(前端)时的回调通知<br>
|
|
||||||
* <xml></br> <OpenId><![CDATA[111222]]></OpenId></br>
|
|
||||||
* <AppId><![CDATA[wwwwb4f85f3a797777]]></AppId></br>
|
|
||||||
* <IsSubscribe>1</IsSubscribe></br>
|
|
||||||
* <TimeStamp>1369743511</TimeStamp></br>
|
|
||||||
* <NonceStr><![CDATA[jALldRTHAFd5Tgs5]]></NonceStr></br>
|
|
||||||
* <AppSignature><![CDATA[bafe07f060f22dcda0bfdb4b5ff756f973aecffa]]>
|
|
||||||
* </AppSignature></br>
|
|
||||||
* <SignMethod><![CDATA[sha1]]></SignMethod></br> </xml></br>
|
|
||||||
* 参与签名的字段为: appid、appkey、timestamp、noncestr、openid、issubscribe
|
|
||||||
*
|
|
||||||
* @param 订单信息
|
|
||||||
* @param inputStream
|
|
||||||
* 用户信息
|
|
||||||
*
|
|
||||||
* @see com.foxinmy.weixin4j.mp.payment.JsPayNotify
|
|
||||||
* @return success或其他
|
|
||||||
*/
|
|
||||||
public String jsNotifyV2(InputStream inputStream) {
|
|
||||||
Map<String, String> objMap = new HashMap<String, String>();
|
|
||||||
/*
|
|
||||||
* 收集url中携带的参数 /pay/notify/back?attach=8&bank_billno=201410293351060&
|
|
||||||
* bank_type=2032&discount=0&fee_type=1&input_charset=UTF-8&
|
|
||||||
* notify_id=9fKbVf_qg6y-
|
|
||||||
* wSjtSMV0PLXeEn2oGfTM1s9dWSvR2B9U6iFQRTzmjrMWKUxvh9mpBLvnh8aqFbC_OFk1pTvFnFUO00Lln4fh
|
|
||||||
* & out_trade_no=D14102900031&partner=1221928801&product_fee=1&
|
|
||||||
* sign=B9D6E772C271C9B86B8436FC9F5DFC1A&
|
|
||||||
* sign_type=MD5&time_end=20141029183707&
|
|
||||||
* total_fee=1&trade_mode=1&trade_state=0&
|
|
||||||
* transaction_id=1221928801201410296039230054&transport_fee=0
|
|
||||||
*/
|
|
||||||
log.info("jspay_notify_orderinfo,{}", objMap);
|
|
||||||
JsPayNotify payNotify = XmlStream.get(inputStream, JsPayNotify.class);
|
|
||||||
log.info("jspay_notify_userinfo,{}", payNotify);
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
// 验证财付通签名
|
|
||||||
String sign = objMap.get("sign");
|
|
||||||
objMap.remove("sign");
|
|
||||||
String _sign = PayUtil
|
|
||||||
.paysignMd5(objMap, weixinAccount.getPartnerKey());
|
|
||||||
log.info("财付通签名----->sign={},vaild_sign={}", sign, _sign);
|
|
||||||
if (!sign.equals(_sign)) {
|
|
||||||
return "fail";
|
|
||||||
}
|
|
||||||
objMap.clear();
|
|
||||||
// 验证微信签名
|
|
||||||
sign = payNotify.getPaySign();
|
|
||||||
payNotify.setPaySign(null);
|
|
||||||
payNotify.setSignType(null);
|
|
||||||
String vaild_sign = PayUtil.paysignSha(payNotify,
|
|
||||||
weixinAccount.getPaySignKey());
|
|
||||||
log.info("微信签名----->sign={},vaild_sign={}", sign, vaild_sign);
|
|
||||||
if (!sign.equals(vaild_sign)) {
|
|
||||||
return "fail";
|
|
||||||
}
|
|
||||||
// 处理业务逻辑
|
|
||||||
return "success";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* JSAPI(V3)支付成功(前端)时的回调通知
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @param inputStream
|
|
||||||
* 订单回调
|
|
||||||
* @return <xml><br>
|
|
||||||
* <return_code>SUCCESS/FAIL</return_code><br>
|
|
||||||
* <return_msg>如非空,为错误 原因签名失败参数格式校验错误</return_msg><br>
|
|
||||||
* </xml>
|
|
||||||
* @throws DocumentException
|
|
||||||
* @see <a
|
|
||||||
* href="http://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7">支付结果通知</a>
|
|
||||||
*/
|
|
||||||
public String jsNotifyV3(InputStream inputStream) {
|
|
||||||
String orderXml = "从inputStream中读取订单信息";
|
|
||||||
com.foxinmy.weixin4j.mp.payment.v3.Order order = CouponConverter
|
|
||||||
.fromXML(orderXml,
|
|
||||||
com.foxinmy.weixin4j.mp.payment.v3.Order.class);
|
|
||||||
log.info("jsapi_notify_order_info:", order);
|
|
||||||
String sign = order.getSign();
|
|
||||||
order.setSign(null);
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
String valid_sign = PayUtil.paysignMd5(order,
|
|
||||||
weixinAccount.getPaySignKey());
|
|
||||||
// 如果订单中存在代金券的情况并不适用
|
|
||||||
log.info("微信签名----->sign={},vaild_sign={}", sign, valid_sign);
|
|
||||||
if (!sign.equals(valid_sign)) {
|
|
||||||
return XmlStream.to(new XmlResult(Consts.FAIL, "签名错误"));
|
|
||||||
}
|
|
||||||
// 处理业务逻辑
|
|
||||||
return XmlStream.to(new XmlResult(Consts.SUCCESS, ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* V2.x版本Native支付时POST数据<br>
|
|
||||||
* <xml></br> <OpenId><![CDATA[111222]]></OpenId></br>
|
|
||||||
* <AppId><![CDATA[wwwwb4f85f3a797777]]></AppId></br>
|
|
||||||
* <IsSubscribe>1</IsSubscribe></br>
|
|
||||||
* <ProductId>[CDATA[000000]]</ProductId></br>
|
|
||||||
* <TimeStamp>1369743511</TimeStamp></br>
|
|
||||||
* <NonceStr><![CDATA[jALldRTHAFd5Tgs5]]></NonceStr></br>
|
|
||||||
* <AppSignature><![CDATA[bafe07f060f22dcda0bfdb4b5ff756f973aecffa]]>
|
|
||||||
* </AppSignature></br>
|
|
||||||
* <SignMethod><![CDATA[sha1]]></SignMethod></br> </xml></br>
|
|
||||||
* 参与签名的字段为: appid、appkey、timestamp、noncestr、openid、issubscribe、productId
|
|
||||||
*
|
|
||||||
* @param inputStream
|
|
||||||
*
|
|
||||||
* @return 必须返回一个带有Package信息的xml字符串
|
|
||||||
*/
|
|
||||||
public String nativeNotifyV2(InputStream inputStream) {
|
|
||||||
// V2.x版本
|
|
||||||
NativePayNotifyV2 payNotify = XmlStream.get(inputStream,
|
|
||||||
NativePayNotifyV2.class);
|
|
||||||
log.info("native_pay_notify,{}", payNotify);
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
String sign = payNotify.getPaySign();
|
|
||||||
payNotify.setPaySign(null);
|
|
||||||
payNotify.setSignType(null);
|
|
||||||
// 验证微信签名
|
|
||||||
String vaild_sign = PayUtil.paysignSha(payNotify,
|
|
||||||
weixinAccount.getPaySignKey());
|
|
||||||
log.info("微信签名----->sign={},vaild_sign={}", sign, vaild_sign);
|
|
||||||
if (!sign.equals(vaild_sign)) {
|
|
||||||
return "fail";
|
|
||||||
}
|
|
||||||
// 构造订单信息
|
|
||||||
PayPackageV2 payPackage = new PayPackageV2("商品描述",
|
|
||||||
weixinAccount.getPartnerId(), "系统内部订单号", 1d, "回调地址", "IP地址");
|
|
||||||
NativePayResponseV2 payResponse = new NativePayResponseV2(
|
|
||||||
weixinAccount, payPackage);
|
|
||||||
return XmlStream.to(payResponse);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* V3.x版本native回调<br>
|
|
||||||
* <xml></br> <openid><![CDATA[111222]]></openid></br>
|
|
||||||
* <appid><![CDATA[wwwwb4f85f3a797777]]></appid></br>
|
|
||||||
* <mch_id><![CDATA[1100022]]></mch_id></br>
|
|
||||||
* <is_subscribe>1</is_subscribe></br>
|
|
||||||
* <product_id>[CDATA[000000]]</product_id></br>
|
|
||||||
* <nonce_str><![CDATA[jALldRTHAFd5Tgs5]]></nonce_str></br>
|
|
||||||
* <sign><![CDATA[bafe07f060f22dcda0bfdb4b5ff756f973aecffa]]>
|
|
||||||
* </sign></br> </xml></br>
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* @throws PayException
|
|
||||||
*/
|
|
||||||
public String nativeNotifyV3(InputStream inputStream) throws PayException {
|
|
||||||
NativePayNotifyV3 payNotify = XmlStream.get(inputStream,
|
|
||||||
NativePayNotifyV3.class);
|
|
||||||
String sign = payNotify.getSign();
|
|
||||||
payNotify.setSign(null);
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
String valid_sign = PayUtil.paysignMd5(payNotify,
|
|
||||||
weixinAccount.getPaySignKey());
|
|
||||||
log.info("微信签名----->sign={},vaild_sign={}", sign, valid_sign);
|
|
||||||
// 生成Package
|
|
||||||
PayPackageV3 payPackage = new PayPackageV3(weixinAccount, "用户openid",
|
|
||||||
"商品描述", "系统内部订单号", 1d, "IP地址", TradeType.NATIVE);
|
|
||||||
payPackage.setProductId(payNotify.getProductId());
|
|
||||||
if (!sign.equals(valid_sign)) {
|
|
||||||
// 校验失败
|
|
||||||
NativePayResponseV3 payReponse = new NativePayResponseV3("签名失败",
|
|
||||||
null);
|
|
||||||
payReponse.setSign(PayUtil.paysignMd5(payReponse,
|
|
||||||
weixinAccount.getPaySignKey()));
|
|
||||||
return XmlStream.to(payReponse);
|
|
||||||
|
|
||||||
}
|
|
||||||
// 成功返回
|
|
||||||
NativePayResponseV3 payReponse = new NativePayResponseV3(payPackage,
|
|
||||||
weixinAccount.getPaySignKey());
|
|
||||||
payReponse.setSign(PayUtil.paysignMd5(payReponse,
|
|
||||||
weixinAccount.getPaySignKey()));
|
|
||||||
return XmlStream.to(payReponse);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 告警通知 需要成功返回 success </br> <xml></br>
|
|
||||||
* <AppId><![CDATA[wxf8b4f85f3a794e77]]></AppId></br>
|
|
||||||
* <ErrorType>1001</ErrorType></br>
|
|
||||||
* <Description><![CDATA[错误描述]]></Description></br>
|
|
||||||
* <AlarmContent><![CDATA[错误详情]]></AlarmContent></br>
|
|
||||||
* <TimeStamp>1393860740</TimeStamp></br>
|
|
||||||
* <AppSignature><![CDATA[签名方式跟JsPayRequest中的paySign一样]]></
|
|
||||||
* AppSignature></br>
|
|
||||||
* <SignMethod><![CDATA[sha1]]></SignMethod></br>
|
|
||||||
* </xml></br>
|
|
||||||
* 参与签名字段:alarmcontent、appid、appkey、description、errortype、timestamp
|
|
||||||
*
|
|
||||||
* @param inputStream
|
|
||||||
* xml数据
|
|
||||||
* @see com.foxinmy.weixin4j.mp.payment.v2.PayWarn
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String warning(InputStream inputStream) {
|
|
||||||
PayWarn payWarn = XmlStream.get(inputStream, PayWarn.class);
|
|
||||||
log.info("pay_warning,{}", payWarn);
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
String sign = payWarn.getPaySign();
|
|
||||||
payWarn.setPaySign(null);
|
|
||||||
payWarn.setSignType(null);
|
|
||||||
// 验证微信签名
|
|
||||||
String vaild_sign = PayUtil.paysignSha(payWarn,
|
|
||||||
weixinAccount.getPaySignKey());
|
|
||||||
log.info("微信签名----->sign={},vaild_sign={}", sign, vaild_sign);
|
|
||||||
return "success";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户维权
|
|
||||||
*
|
|
||||||
* @param inputStream
|
|
||||||
* @see com.foxinmy.weixin4j.mp.payment.v2.PayFeedback
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String feedback(InputStream inputStream) {
|
|
||||||
PayFeedback feedback = XmlStream.get(inputStream, PayFeedback.class);
|
|
||||||
log.info("pay_feedback_info:{}", feedback);
|
|
||||||
WeixinMpAccount weixinAccount = JSON.parseObject(
|
|
||||||
ConfigUtil.getValue("account"), WeixinMpAccount.class);
|
|
||||||
// 验证微信签名
|
|
||||||
Map<String, String> obj = new HashMap<String, String>();
|
|
||||||
obj.put("openid", feedback.getOpenId());
|
|
||||||
obj.put("appid", feedback.getAppId());
|
|
||||||
obj.put("timestamp", feedback.getTimeStamp());
|
|
||||||
obj.put("appkey", weixinAccount.getPaySignKey());
|
|
||||||
String sign = PayUtil.paysignSha(obj);
|
|
||||||
log.info("微信签名----->sign={},vaild_sign={}", sign, feedback.getPaySign());
|
|
||||||
return "success";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -94,7 +94,7 @@ base on netty.
|
|||||||
|
|
||||||
assembly打包(辅助)
|
assembly打包(辅助)
|
||||||
-----------------
|
-----------------
|
||||||
> [assembly](http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html)是maven的一个打包插件,它可以创建一> 个包含脚本、配置文件以及所有运行时所依赖的元素(jar)assembly插件能帮你构建一个完整的发布包.
|
> [assembly](http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html)是maven的一个打包插件,它可以创建一个包含脚本、配置文件以及所有运行时所依赖的元素(jar)assembly插件能帮你构建一个完整的发布包.
|
||||||
|
|
||||||
1.复制[assembly.xml](./src/main/assembly.xml)和[startup.sh](./src/main/startup.sh)到自己工程的src/main目录下.
|
1.复制[assembly.xml](./src/main/assembly.xml)和[startup.sh](./src/main/startup.sh)到自己工程的src/main目录下.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user