有两种方式
第一是修改maven pom 文件增加
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.handlers</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.schemas</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/spring.tooling</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.zufangbao.renterremind.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
第二种方式,在已生成的jar包META-INF文件夹中增加三个文件即可
spring.handlers,spring.schemas,spring.tooling
spring.handlers:
http\://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler
http\://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler
http\://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler
http\://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler
http\://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler
http\://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler
http\://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler
http\://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler
http\://www.springframework.org/schema/jdbc=org.springframework.jdbc.config.JdbcNamespaceHandler
http\://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler
http\://www.springframework.org/schema/webflow-config=org.springframework.webflow.config.WebFlowConfigNamespaceHandler
http\://www.springframework.org/schema/mvc=org.springframework.web.servlet.config.MvcNamespaceHandler
spring.schemas:
http\://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd
http\://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd
http\://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
http\://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd
http\://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd
http\://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd
http\://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd
http\://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd
http\://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd
http\://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd
http\://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http\://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http\://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd
http\://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd
http\://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd
http\://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd
http\://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd
http\://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd
http\://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd
http\://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd
http\://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd
http\://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd
http\://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd
http\://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd
http\://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd
http\://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd
http\://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd
http\://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd
http\://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd
http\://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd
http\://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd
http\://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd
http\://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd
http\://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd
http\://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd
http\://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd
http\://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd
http\://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd=org/springframework/webflow/config/spring-webflow-config-2.0.xsd
http\://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd
http\://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd
spring.tooling
# Tooling related information for the tx namespace
http\://www.springframework.org/schema/tx@name=tx Namespace
http\://www.springframework.org/schema/tx@prefix=tx
http\://www.springframework.org/schema/tx@icon=org/springframework/transaction/config/spring-tx.gif
http\://www.springframework.org/schema/aop@name=aop Namespace
http\://www.springframework.org/schema/aop@prefix=aop
http\://www.springframework.org/schema/aop@icon=org/springframework/aop/config/spring-aop.gif
http\://www.springframework.org/schema/beans@name=beans Namespace
http\://www.springframework.org/schema/beans@prefix=beans
http\://www.springframework.org/schema/beans@icon=org/springframework/beans/factory/xml/spring-beans.gif
http\://www.springframework.org/schema/util@name=util Namespace
http\://www.springframework.org/schema/util@prefix=util
http\://www.springframework.org/schema/util@icon=org/springframework/beans/factory/xml/spring-util.gif
http\://www.springframework.org/schema/context@name=context Namespace
http\://www.springframework.org/schema/context@prefix=context
http\://www.springframework.org/schema/context@icon=org/springframework/context/config/spring-context.gif
http\://www.springframework.org/schema/jee@name=jee Namespace
http\://www.springframework.org/schema/jee@prefix=jee
http\://www.springframework.org/schema/jee@icon=org/springframework/ejb/config/spring-jee.gif
http\://www.springframework.org/schema/task@name=task Namespace
http\://www.springframework.org/schema/task@prefix=task
http\://www.springframework.org/schema/task@icon=org/springframework/scheduling/config/spring-task.gif
http\://www.springframework.org/schema/lang@name=lang Namespace
http\://www.springframework.org/schema/lang@prefix=lang
http\://www.springframework.org/schema/lang@icon=org/springframework/scripting/config/spring-lang.gif
http\://www.springframework.org/schema/jdbc@name=jdbc Namespace
http\://www.springframework.org/schema/jdbc@prefix=jdbc
http\://www.springframework.org/schema/jdbc@icon=org/springframework/jdbc/config/spring-jdbc.gif
http\://www.springframework.org/schema/oxm@name=oxm Namespace
http\://www.springframework.org/schema/oxm@prefix=oxm
http\://www.springframework.org/schema/oxm@icon=org/springframework/oxm/config/spring-oxm.gif
http\://www.springframework.org/schema/mvc@name=mvc Namespace
http\://www.springframework.org/schema/mvc@prefix=mvc
http\://www.springframework.org/schema/mvc@icon=org/springframework/web/servlet/config/spring-mvc.gif
相关推荐
<resource>META-INF/spring.handlers implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> implementation="org.apache.maven.plugins.shade.resource....
Classes contained in spring-mock.jar: org.springframework.mock.jndi.ExpectedLookupTemplate.class org.springframework.mock.jndi.SimpleNamingContext.class org.springframework.mock.jndi....
在Spring Framework 5.1.x的maven版本中,所有必要的库和依赖关系都被定义在pom.xml文件中,使得在IntelliJ IDEA这样的集成开发环境中,可以轻松地导入和构建项目。 IntelliJ IDEA 是JetBrains公司推出的一款强大的...
**Spring Framework 5.2.x Maven 版本详解** Spring Framework是Java开发中不可或缺的开源框架,它为构建高效、灵活且可测试的Java应用程序提供了基础。5.2.x是其一个重要的版本,引入了许多新特性和改进。在这个...
描述中提到的“C盘中maven仓库的springframework的jar包打包”,意味着这些JAR包原本存在于用户的Maven本地仓库的相应路径下。Maven的默认本地仓库路径通常是`~/.m2/repository`(在Windows系统中,可能是`C:\Users\...
idea新建maven web项目.zip Jetbrains IntelliJ IDEA创建基于maven打包工具的WEB网站项目 本项目使用的是SSM框架spring mvc,spring, mybatis.用maven打包成jar
java运行依赖jar包
Maven坐标:org.springframework:spring-oxm:5.3.15; 标签:spring、oxm、springframework、jar包、java、中英对照文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...
因此,在使用Maven构建Spring工程时,我们需要遵循以下步骤: 1. 下载最新的Maven。 2. 确保您的Eclipse为WTP版本,并且升级了Mavenfor Eclipse。 3. 在pom.xml文件中配置我们的工程依赖关系。 4. 使用Maven插件来...
标题 "spring 扫描jar maven 打包" 涉及的是在Java开发中,如何使用Spring框架和Maven工具来构建并打包一个项目,其中包含Spring对jar包的扫描以及Maven的打包流程。这里我们将深入探讨这两个关键概念。 1. **...
Maven坐标:org.springframework.data:spring-data-commons:2.0.6.RELEASE; 标签:springframework、data、spring、commons、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”...
Maven坐标:org.springframework.boot:spring-boot:2.3.12.RELEASE; 标签:springframework、boot、spring、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览...
java运行依赖jar包
此外,Maven还提供了多种生命周期和插件,用于编译、测试、打包和部署等任务。 整合这三个框架,开发人员可以构建出高效、模块化的Web应用,其中SpringMVC处理HTTP请求,Spring负责业务逻辑和依赖管理,MyBatis处理...
Maven坐标:org.springframework.boot:spring-boot-autoconfigure:2.0.6.RELEASE; 标签:spring、autoconfigure、springframework、boot、jar包、java、API文档、中英对照版; 使用方法:解压翻译后的API文档,用...
用于配置日志打印在控制台的格式等信息,并且也可以调日志信息打印出来的颜色,还能够使日志信息记录在日志文件上并保存在项目根路径下,springboot则用此logback-spring.xml命名,若是maven项目则用logback.xml命名.
NULL 博文链接:https://whatisjavabean.iteye.com/blog/2017035
在Java开发领域,Spring Boot因其简洁的配置和强大的功能,成为了构建Web应用的首选框架。在实际项目中,我们往往需要根据不同的部署环境(如开发、测试、生产)创建定制化的打包文件。`maven-assembly-plugin`是...
用Maven创建的Spring项目,实现了登陆、注册(邮箱验证)的功能。此资源作为适用于刚学习Spring和javaweb的萌新(我也是萌新)。更详细配置见我的博客《STS创建Maven工程配置Spring实现登陆注册功能的过程》。
Maven坐标:org.springframework.security:spring-security-core:5.3.9.RELEASE; 标签:springframework、security、spring、core、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index....