- 2019-07-09 AutoCompleteTextView 问题
皮皮铭
实现自定义Adapter要实现Filterable接口,不然会报错重写getFilter()方法performFiltering()方法实现过滤数据的操作publishResults()用来接收performFiltering()的返回值,发布。
- Spring Security定义多个过滤器链(10)
小黑屋说YYDS
spring
在SpringSecurity中可以同时存在多个过滤器链,一个WebSecurityConfigurerAdapter的实例就可以配置一条过滤器链。我们来看如下一个案例:@ConfigurationpublicclassSecurityConfig{@BeanUserDetailsServiceus(){InMemoryUserDetailsManagerusers=newInMemoryUser
- netty-简易聊天
2401_84046645
程序员java开发语言
publicvoidsend(Stringtext){channel.writeAndFlush(Unpooled.copiedBuffer(text.getBytes()));}publicvoidcloseConnect(){send(“bye”);channel.close();}}classMyHandlerextendsChannelInboundHandlerAdapter{@Over
- Kotlin 代替Java接口回调,就这么简单
深海呐
Android#Kotlinjavakotlin开发语言
假如你使用旧的接口回调:通常三步:1定义接口和方法;2使用接口中方法;3继承接口并实现方法;例:classXXXAdapter{publicvarmClickCollBack:clickCollBack?=null//1定义interfaceclickCollBack{//1定义funclick(int:Int)//1定义}itemView.setOnClickListener{mClickCol
- Android面试从新手到架构师,一篇解析就够(1),跳槽字节跳动
m0_60607609
程序员androidjava面试后端
5.抽象工厂模式:结构型(7):描述如何将类或对象按某种规则组成更大的结构1.桥接模式:对于两个或以上纬度独立变化的场景,将抽象与具体实现分离,实例:用不同颜色画不同形状2.外观模式:对外有一个统一接口,外部不用关心内部子系统的具体实现,这是"迪米特原则"的典型应用3.适配器模式:改变类的接口,使原本由于接口不匹配而无法一起工作的两个类能够在一工作,实例:RecycleView的Adapter不管
- 六边形六边形架构(Hexagonal Architecture),也被称为端口和适配器架构(Ports and Adapters Architecture),是一种软件架构模式,用于构建可测试、可维护
leijmdas
golang
六边形架构(HexagonalArchitecture),也被称为端口和适配器架构(PortsandAdaptersArchitecture),是一种软件架构模式,用于构建可测试、可维护和灵活的应用程序。这种架构模式的核心思想是将应用程序的核心业务逻辑(Domain)与外部系统(Ports)和适配器(Adapters)解耦,使得核心业务逻辑独立于具体的技术实现和外部依赖。在六边形架构中,核心业务逻
- MFC 得到本机IP和设置本机的IP
zq4132
ULONGWINAPIGetAdaptersAddresses( __in ULONGFamily, __in ULONGFlags, __in PVOIDReserved, __inout PIP_ADAPTER_ADDRESSESAdapterAddresses, __inout PULONGSizePointer);第一个参数Family是网络协议族,用户可以指定
- adapter
巫山老妖_
dependencies{compilefileTree(include:['*.jar'],dir:'libs')androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{excludegroup:'com.android.support',module:'support-annotations'})c
- Unity3d学习笔记
明月海子
Mecanin动画系统.pngNavigation导航系统.pngShader渲染基础.png面向对象六大原则.png策略模式Strategy.png工厂模式Factory产品工厂.png观察者Observer.png结构设计模式总结.png模板方法模式TemplateMethod.png适配器模式Adapter.png外观模式Facade.png职责连模式ChainofResponsibilit
- 软考 - 系统架构设计师 - 设计模式
小林想被监督学习
系统架构设计师系统架构设计模式
目录概念创建型设计模式抽象工厂模式(AbstractFactoryPattern)优点缺点应用场景总结构建器模式(BuilderPattern)优点缺点应用场景工厂方法模式(factorymethod)优点缺点应用场景原型模式(prototype)优点缺点应用场景单例模式(Singleton)优点缺点应用场景结构型设计模式适配器模式(Adapter)优点缺点应用场景桥接模式(Bridge)优点缺点
- Android 蓝牙服务启动
薛文旺
Android系统android
蓝牙是Android设备中非常常见的一个feature,设备厂家可以用BT来做RC、连接音箱、设备本身做Sink等常见功能。如果一些设备不需要BT功能,Android也可以通过配置来disable此模块,方便厂家为自己的设备做客制化。APP操作设备的蓝牙功能,一般是通过标准API-BluetoothAdapter实现,这里我们先不关心具体API的实现flow,先来了解Bluetoothframew
- Android kotlin开发项目MVP架构搭建
哎吆我呸
androidKotlin初入门
1、引入需要的网络库implementation'com.squareup.retrofit2:retrofit:2.7.1'implementation'com.squareup.retrofit2:converter-gson:2.7.1'implementation'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.
- 软件开发架构(四) - COLA架构
The_sprite
软件开发架构架构系统架构
COLA(CleanObject-OrientedandLayeredArchitecture)COLA是阿里巴巴开源的应用架构,旨在帮助开发者轻松构建复杂的业务应用。它将应用程序分为四个主要部分:适配器层、应用层、领域层和基础设施层。在Java开发中,COLA常用于构建大型、复杂的企业级应用。适配器层(AdapterLayer):负责处理来自外部的请求并返回响应。在Java中,这可能是基于Spr
- 深入解析:23种软件设计模式详解及其分类(创建型、结构型、行为型)附代码示例DEMO
J^T
设计模式C/C++设计模式装饰器模式组合模式观察者模式单例模式23种设计模式
目录引言一、创建型模式1.简单工厂模式(SimpleFactoryPattern)2.抽象工厂模式(AbstractFactoryPattern)3.单例模式(SingletonPattern)4.建造者模式(BuilderPattern)5.原型模式(PrototypePattern)二、结构型模式1.适配器模式(AdapterPattern)2.桥接模式(BridgePattern)3.装饰器
- 1500仿真 下载时显示不兼容设备
sanzk
c#
下载时显示plc但是红色状态,显示不兼容设备,无法下载方法一:1、需要将SiemensPLCSIMVirtualEthernetAdapter虚拟网卡设置为PLC相同网段2、项目--属性:设置为允许仿真3、plc--属性:允许远程连接对象put/get访问方法二:PLC类型可能不对,选择正确PLC类型
- 腾讯地图SDK Android版开发 10 InfoWindow
程序喵D
腾讯地图Android开发android腾讯地图
腾讯地图SDKAndroid版开发10InfoWindow前言介绍默认风格自定义样式实现方式交互操作播放信息窗口的动画开启多窗口模式相关类和接口默认样式MarkerOptions类Marker类TencentMap类TencentMap.OnInfoWindowClickListener接口类自定义样式TencentMap类TencentMap.InfoWindowAdapter接口示例界面布局M
- 八、适配器模式
磊-
设计模式适配器模式
适配器模式(AdapterPattern)是一种结构型设计模式,它允许不兼容的接口之间进行合作。适配器模式通过创建一个适配器类来转换一个接口的接口,使得原本由于接口不兼容无法一起工作的类可以一起工作。
- Android学习之RecyclerView快速添加头部布局
如果可以003
Androidandroid布局
众所周知我们的ListView、GridView都可以增加头部布局;这样在遇到复杂的头部布局就不用增加视图类型了,不管是对于代码的可维护性还是整洁性;在Adapter中写又臭又长的代码,无论是自己看还是留给后来者都是痛苦的,而且你要是把代码都堆在getView中,ohno!我要分分钟切腹自尽…RecyclerView增加头部布局传统方式真的不是我懒,真的;传统方式我相信大家应该都会了,好吧我还是简
- oracle数据库免密登录失败sqlplus / as sysdba ERROR: ORA-12560: TNS:protocol adapter error Enter user-name:
黄三狗
oracleoraclesysdba12560
一、问题场景描述(建议解决问题之前一定要看这个,仔细对比自己是不是也是这种情况)首先,声明一下我的oracle数据库版本是12c1.输入sqlplus/assysdba免密登录时报如下错误,甚至用管理员身份运行“命令提示符”也不行2.oracle服务一切正常3.sqlplus可以正常连接4.pl/sql也可以正常连接5.在oracle的bin目录下可以连接
- 【可控图像生成系列论文(四)】IP-Adapter 具体是如何训练的?1公式篇
多恩Stone
AIGCDiffusionTransformer计算机视觉深度学习pythonAIGCpytorch机器学习人工智能
系列文章目录【可控图像生成系列论文(一)】简要介绍了MimicBrush的整体流程和方法;【可控图像生成系列论文(二)】就MimicBrush的具体模型结构、训练数据和纹理迁移进行了更详细的介绍。【可控图像生成系列论文(三)】介绍了一篇相对早期(2018年)的可控字体艺术化工作。文章目录系列文章目录前言〇、文生图模型预备知识1.训练目标2.无分类器指导(classifier-freeguidanc
- android解决FragmentPagerAdapter刷新问题
crush_d872
项目中目前需要完成一个需求,具体如下:用户在无网络情况下要展示缓存数据,而我们的首页中采用了viewpager+fragment的形式进行数据的展示,联网之后还需要整体刷新数据,我们第一版所采用的刷新方式是这样的:publicvoidsetFragments(Listfragments){if(this.mFragmentList!=null){FragmentTransactionft=frag
- 20240902软考架构-------软考96-100答案解析
杨诚实
软考架构架构
每日打卡题96-100答案96、【2018年真题】难度:难CORBA服务端构件模型中,是CORBA对象的真正实现,负责完成客户端请求。A.伺服对象(Servant)B.对象适配器(ObjectAdapter)C.对象请求代理(ObjectRequestBroker)D.适配器激活器(AdapterActivator)答案:A解析:伺服对象(Servant):CORBA对象的真正实现,负责完成客户端
- Android 网络编程一
uniapp
Android的ListView采用MVC的方式显示,Model代表显示条目实体,View代表ListView,C代表Adapter。相比iOS中Controller和View相互融合的处境,Android中的MVC更加清新自然。Google在Android中预制了很多示例Demo,集中放在了ApiDemo中,代码可以从github上单独下载。在Mac下的地址为Library/Android/sd
- Trimmomatic 数据过滤
生信编程日常
Trimmomatic是一个很常用的Illumina平台数据过滤工具。支持SE和PE测序数据。主要用来去除Illumina平台的fastq序列中的接头,并根据碱基质量值对fastq进行修剪。用法:Trimmomatic=~/biotools/Trimmomatic-0.36/trimmomatic-0.36.jaradapter=~/biotools/Trimmomatic-0.36/adapte
- canal-adapter消费Kafka中MySQL的binlog数据,却没有同步更新Elastic search
iiopsd
kafkamysqljavaelasticsearch
背景在同步MySQL数据到ES的场景中,选择了canal组件同步数据。问题描述在同步的时候发现canal-adapter中canal-adapter/conf/es7/product.yml配置文件中sql语句连表查询的时候会出现无法更新Elasticsearch中数据的情况,而且日志没有提示异常(idea启动的时候有错误日志),令人百思不得其解。问题分析初步估计是内部解析yml的时候出错了,但具
- SpringMVC 第一次复学笔记
会有黎明吗
学习记录笔记
服务器启动时,创建spring容器;dispatcherServlet启动时,直接创建springmvc容器初始化一次,实现了springmvc和spring的整合。SpringMVC里的组件处理器映射器(HandlerMapping)负责匹配映射路径对应的Handler,返回可执行的处理器链对象HandlerExecutionChain对象。处理器适配器(HandlerAdapter)负责匹配H
- 设计模式-结构性模式
$驽马十驾$
设计模式
结构型模式1.适配器模式(AdapterPattern)2.桥接模式(BridgePattern)3.装饰器模式(DecoratorPattern)步骤1:定义咖啡接口步骤2:具体的咖啡类步骤3:装饰器抽象类步骤4:具体的装饰器类步骤5:使用装饰器4.组合模式(CompositePattern)4.1定义组件接口4.2实现基本的图形4.3实现复合图形4.4客户端代码5.外观模式(FacadePat
- 【大模型】Agent基础知识
idiotyi
大模型人工智能自然语言处理
目录1.基本框架2.常见推理模式2.1ReAct:SynergizingReasoningandActinginLanguageModels2.2Reflection2.3LATS:LanguageAgentsTreeSearch3.微调3.1全模型微调(FullModelFine-Tuning)3.2冻结部分层微调(Layer-wiseFine-Tuning)3.3适配器(Adapters)3.
- 23种设计模式(GOF)
gb4215287
javajava
设计模式(GOF)分为三种类型,共23类。1、单例模式(Singleton)2、原型模式(Prototype)简单工厂模式(SimpleFactoryMode)3、工厂方法模式(FactoryMethod)4、抽象工厂模式(AbstractFactory)5、建造者模式(Builder)6、代理模式(Proxy)7、适配器模式(Adapter)8、桥接模式(Bridge)9、装饰器模式(Decor
- Dubbo与Netty
蹩脚的小三
CodecCodecSupportAbstractCodecTransportCodecCodecAdapterDispacherChannelHandlersDispatcherAllDispatcherAllChannelHandlerChannelEventRunnableWrappedChannelHandlerChannelHandlerChannelHandlerAdapterChan
- Js函数返回值
_wy_
jsreturn
一、返回控制与函数结果,语法为:return 表达式;作用: 结束函数执行,返回调用函数,而且把表达式的值作为函数的结果 二、返回控制语法为:return;作用: 结束函数执行,返回调用函数,而且把undefined作为函数的结果 在大多数情况下,为事件处理函数返回false,可以防止默认的事件行为.例如,默认情况下点击一个<a>元素,页面会跳转到该元素href属性
- MySQL 的 char 与 varchar
bylijinnan
mysql
今天发现,create table 时,MySQL 4.1有时会把 char 自动转换成 varchar
测试举例:
CREATE TABLE `varcharLessThan4` (
`lastName` varchar(3)
) ;
mysql> desc varcharLessThan4;
+----------+---------+------+-
- Quartz——TriggerListener和JobListener
eksliang
TriggerListenerJobListenerquartz
转载请出自出处:http://eksliang.iteye.com/blog/2208624 一.概述
listener是一个监听器对象,用于监听scheduler中发生的事件,然后执行相应的操作;你可能已经猜到了,TriggerListeners接受与trigger相关的事件,JobListeners接受与jobs相关的事件。
二.JobListener监听器
j
- oracle层次查询
18289753290
oracle;层次查询;树查询
.oracle层次查询(connect by)
oracle的emp表中包含了一列mgr指出谁是雇员的经理,由于经理也是雇员,所以经理的信息也存储在emp表中。这样emp表就是一个自引用表,表中的mgr列是一个自引用列,它指向emp表中的empno列,mgr表示一个员工的管理者,
select empno,mgr,ename,sal from e
- 通过反射把map中的属性赋值到实体类bean对象中
酷的飞上天空
javaee泛型类型转换
使用过struts2后感觉最方便的就是这个框架能自动把表单的参数赋值到action里面的对象中
但现在主要使用Spring框架的MVC,虽然也有@ModelAttribute可以使用但是明显感觉不方便。
好吧,那就自己再造一个轮子吧。
原理都知道,就是利用反射进行字段的赋值,下面贴代码
主要类如下:
import java.lang.reflect.Field;
imp
- SAP HANA数据存储:传统硬盘的瓶颈问题
蓝儿唯美
HANA
SAPHANA平台有各种各样的应用场景,这也意味着客户的实施方法有许多种选择,关键是如何挑选最适合他们需求的实施方案。
在 《Implementing SAP HANA》这本书中,介绍了SAP平台在现实场景中的运作原理,并给出了实施建议和成功案例供参考。本系列文章节选自《Implementing SAP HANA》,介绍了行存储和列存储的各自特点,以及SAP HANA的数据存储方式如何提升空间压
- Java Socket 多线程实现文件传输
随便小屋
javasocket
高级操作系统作业,让用Socket实现文件传输,有些代码也是在网上找的,写的不好,如果大家能用就用上。
客户端类:
package edu.logic.client;
import java.io.BufferedInputStream;
import java.io.Buffered
- java初学者路径
aijuans
java
学习Java有没有什么捷径?要想学好Java,首先要知道Java的大致分类。自从Sun推出Java以来,就力图使之无所不包,所以Java发展到现在,按应用来分主要分为三大块:J2SE,J2ME和J2EE,这也就是Sun ONE(Open Net Environment)体系。J2SE就是Java2的标准版,主要用于桌面应用软件的编程;J2ME主要应用于嵌入是系统开发,如手机和PDA的编程;J2EE
- APP推广
aoyouzi
APP推广
一,免费篇
1,APP推荐类网站自主推荐
最美应用、酷安网、DEMO8、木蚂蚁发现频道等,如果产品独特新颖,还能获取最美应用的评测推荐。PS:推荐简单。只要产品有趣好玩,用户会自主分享传播。例如足迹APP在最美应用推荐一次,几天用户暴增将服务器击垮。
2,各大应用商店首发合作
老实盯着排期,多给应用市场官方负责人献殷勤。
3,论坛贴吧推广
百度知道,百度贴吧,猫扑论坛,天涯社区,豆瓣(
- JSP转发与重定向
百合不是茶
jspservletJava Webjsp转发
在servlet和jsp中我们经常需要请求,这时就需要用到转发和重定向;
转发包括;forward和include
例子;forwrad转发; 将请求装法给reg.html页面
关键代码;
req.getRequestDispatcher("reg.html
- web.xml之jsp-config
bijian1013
javaweb.xmlservletjsp-config
1.作用:主要用于设定JSP页面的相关配置。
2.常见定义:
<jsp-config>
<taglib>
<taglib-uri>URI(定义TLD文件的URI,JSP页面的tablib命令可以经由此URI获取到TLD文件)</tablib-uri>
<taglib-location>
TLD文件所在的位置
- JSF2.2 ViewScoped Using CDI
sunjing
CDIJSF 2.2ViewScoped
JSF 2.0 introduced annotation @ViewScoped; A bean annotated with this scope maintained its state as long as the user stays on the same view(reloads or navigation - no intervening views). One problem w
- 【分布式数据一致性二】Zookeeper数据读写一致性
bit1129
zookeeper
很多文档说Zookeeper是强一致性保证,事实不然。关于一致性模型请参考http://bit1129.iteye.com/blog/2155336
Zookeeper的数据同步协议
Zookeeper采用称为Quorum Based Protocol的数据同步协议。假如Zookeeper集群有N台Zookeeper服务器(N通常取奇数,3台能够满足数据可靠性同时
- Java开发笔记
白糖_
java开发
1、Map<key,value>的remove方法只能识别相同类型的key值
Map<Integer,String> map = new HashMap<Integer,String>();
map.put(1,"a");
map.put(2,"b");
map.put(3,"c"
- 图片黑色阴影
bozch
图片
.event{ padding:0; width:460px; min-width: 460px; border:0px solid #e4e4e4; height: 350px; min-heig
- 编程之美-饮料供货-动态规划
bylijinnan
动态规划
import java.util.Arrays;
import java.util.Random;
public class BeverageSupply {
/**
* 编程之美 饮料供货
* 设Opt(V’,i)表示从i到n-1种饮料中,总容量为V’的方案中,满意度之和的最大值。
* 那么递归式就应该是:Opt(V’,i)=max{ k * Hi+Op
- ajax大参数(大数据)提交性能分析
chenbowen00
WebAjax框架浏览器prototype
近期在项目中发现如下一个问题
项目中有个提交现场事件的功能,该功能主要是在web客户端保存现场数据(主要有截屏,终端日志等信息)然后提交到服务器上方便我们分析定位问题。客户在使用该功能的过程中反应点击提交后反应很慢,大概要等10到20秒的时间浏览器才能操作,期间页面不响应事件。
根据客户描述分析了下的代码流程,很简单,主要通过OCX控件截屏,在将前端的日志等文件使用OCX控件打包,在将之转换为
- [宇宙与天文]在太空采矿,在太空建造
comsci
我们在太空进行工业活动...但是不太可能把太空工业产品又运回到地面上进行加工,而一般是在哪里开采,就在哪里加工,太空的微重力环境,可能会使我们的工业产品的制造尺度非常巨大....
地球上制造的最大工业机器是超级油轮和航空母舰,再大些就会遇到困难了,但是在空间船坞中,制造的最大工业机器,可能就没
- ORACLE中CONSTRAINT的四对属性
daizj
oracleCONSTRAINT
ORACLE中CONSTRAINT的四对属性
summary:在data migrate时,某些表的约束总是困扰着我们,让我们的migratet举步维艰,如何利用约束本身的属性来处理这些问题呢?本文详细介绍了约束的四对属性: Deferrable/not deferrable, Deferred/immediate, enalbe/disable, validate/novalidate,以及如
- Gradle入门教程
dengkane
gradle
一、寻找gradle的历程
一开始的时候,我们只有一个工程,所有要用到的jar包都放到工程目录下面,时间长了,工程越来越大,使用到的jar包也越来越多,难以理解jar之间的依赖关系。再后来我们把旧的工程拆分到不同的工程里,靠ide来管理工程之间的依赖关系,各工程下的jar包依赖是杂乱的。一段时间后,我们发现用ide来管理项程很不方便,比如不方便脱离ide自动构建,于是我们写自己的ant脚本。再后
- C语言简单循环示例
dcj3sjt126com
c
# include <stdio.h>
int main(void)
{
int i;
int count = 0;
int sum = 0;
float avg;
for (i=1; i<=100; i++)
{
if (i%2==0)
{
count++;
sum += i;
}
}
avg
- presentModalViewController 的动画效果
dcj3sjt126com
controller
系统自带(四种效果):
presentModalViewController模态的动画效果设置:
[cpp]
view plain
copy
UIViewController *detailViewController = [[UIViewController al
- java 二分查找
shuizhaosi888
二分查找java二分查找
需求:在排好顺序的一串数字中,找到数字T
一般解法:从左到右扫描数据,其运行花费线性时间O(N)。然而这个算法并没有用到该表已经排序的事实。
/**
*
* @param array
* 顺序数组
* @param t
* 要查找对象
* @return
*/
public stati
- Spring Security(07)——缓存UserDetails
234390216
ehcache缓存Spring Security
Spring Security提供了一个实现了可以缓存UserDetails的UserDetailsService实现类,CachingUserDetailsService。该类的构造接收一个用于真正加载UserDetails的UserDetailsService实现类。当需要加载UserDetails时,其首先会从缓存中获取,如果缓存中没
- Dozer 深层次复制
jayluns
VOmavenpo
最近在做项目上遇到了一些小问题,因为架构在做设计的时候web前段展示用到了vo层,而在后台进行与数据库层操作的时候用到的是Po层。这样在业务层返回vo到控制层,每一次都需要从po-->转化到vo层,用到BeanUtils.copyProperties(source, target)只能复制简单的属性,因为实体类都配置了hibernate那些关联关系,所以它满足不了现在的需求,但后发现还有个很
- CSS规范整理(摘自懒人图库)
a409435341
htmlUIcss浏览器
刚没事闲着在网上瞎逛,找了一篇CSS规范整理,粗略看了一下后还蛮有一定的道理,并自问是否有这样的规范,这也是初入前端开发的人一个很好的规范吧。
一、文件规范
1、文件均归档至约定的目录中。
具体要求通过豆瓣的CSS规范进行讲解:
所有的CSS分为两大类:通用类和业务类。通用的CSS文件,放在如下目录中:
基本样式库 /css/core
- C++动态链接库创建与使用
你不认识的休道人
C++dll
一、创建动态链接库
1.新建工程test中选择”MFC [dll]”dll类型选择第二项"Regular DLL With MFC shared linked",完成
2.在test.h中添加
extern “C” 返回类型 _declspec(dllexport)函数名(参数列表);
3.在test.cpp中最后写
extern “C” 返回类型 _decls
- Android代码混淆之ProGuard
rensanning
ProGuard
Android应用的Java代码,通过反编译apk文件(dex2jar、apktool)很容易得到源代码,所以在release版本的apk中一定要混淆一下一些关键的Java源码。
ProGuard是一个开源的Java代码混淆器(obfuscation)。ADT r8开始它被默认集成到了Android SDK中。
官网:
http://proguard.sourceforge.net/
- 程序员在编程中遇到的奇葩弱智问题
tomcat_oracle
jquery编程ide
现在收集一下:
排名不分先后,按照发言顺序来的。
1、Jquery插件一个通用函数一直报错,尤其是很明显是存在的函数,很有可能就是你没有引入jquery。。。或者版本不对
2、调试半天没变化:不在同一个文件中调试。这个很可怕,我们很多时候会备份好几个项目,改完发现改错了。有个群友说的好: 在汤匙
- 解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
xp9802
dependency
解决办法:在plugins之前添加如下pluginManagement,二者前后顺序如下:
[html]
view plain
copy
<build>
<pluginManagement