当前位置: 首页 > news >正文

wap 网站 源码商贸有限公司门头照片

wap 网站 源码,商贸有限公司门头照片,活动策划,中山公众号平台商场网站建设1. 依赖管理 依赖管理#xff0c;可以将有关依赖项的所有信息放在共同的POM中#xff0c;并对子POM中的工件进行更简单的引用。举个例子#xff1a; 父POM project......dependencyManagementdependenciesdependencygroupIdgro…1.  依赖管理 依赖管理可以将有关依赖项的所有信息放在共同的POM中并对子POM中的工件进行更简单的引用。举个例子 父POM project......dependencyManagementdependenciesdependencygroupIdgroup-a/groupIdartifactIdartifact-a/artifactIdversion1.0/versionexclusionsexclusiongroupIdgroup-c/groupIdartifactIdexcluded-artifact/artifactId/exclusion/exclusions/dependencydependencygroupIdgroup-c/groupIdartifactIdartifact-b/artifactIdversion1.0/versiontypewar/typescoperuntime/scope/dependencydependencygroupIdgroup-a/groupIdartifactIdartifact-b/artifactIdversion1.0/versiontypebar/typescoperuntime/scope/dependency/dependencies/dependencyManagement...... /project 两个子POM project...dependenciesdependencygroupIdgroup-a/groupIdartifactIdartifact-a/artifactId/dependencydependencygroupIdgroup-a/groupIdartifactIdartifact-b/artifactId!-- This is not a jar dependency, so we must specify type. --typebar/type/dependency/dependencies /projectproject...dependenciesdependencygroupIdgroup-c/groupIdartifactIdartifact-b/artifactId!-- This is not a jar dependency, so we must specify type. --typewar/type/dependencydependencygroupIdgroup-a/groupIdartifactIdartifact-b/artifactId!-- This is not a jar dependency, so we must specify type. --typebar/type/dependency/dependencies /project 在dependencyManagement区域实际上是根据{groupId, artifactId, type, classifier}来进行依赖匹配的。自从type字段的默认值是jar以后最简单的标识只需要设置{groupId, artifactId}即可。 依赖管理的另一个重要的作用是统一管理控制依赖的版本。这一点不再赘述。 2.  导入依赖 依赖可以继承但是目前只支持单继承可以通过“import”的方式从其它POM中导入依赖。 下面的例子Z导入了X和Y管理的依赖。 projectmodelVersion4.0.0/modelVersiongroupIdmaven/groupIdartifactIdZ/artifactIdpackagingpom/packagingversion1.0/versiondependencyManagementdependenciesdependencygroupIdmaven/groupIdartifactIdX/artifactIdversion1.0/versiontypepom/typescopeimport/scope/dependencydependencygroupIdmaven/groupIdartifactIdY/artifactIdversion1.0/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagement /project 举个例子 ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdcom.example/groupIdartifactIddemo-parent/artifactIdversion0.0.1-SNAPSHOT/version/parentgroupIdcom.example/groupIdartifactIddemo001/artifactIdversion0.0.1-SNAPSHOT/versiondependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependency/dependenciesdependencyManagementdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-dependencies/artifactIdversion2.7.11/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagementbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactIdconfigurationexcludesexcludegroupIdorg.projectlombok/groupIdartifactIdlombok/artifactId/exclude/excludes/configuration/plugin/plugins/build/project 3.  版本管理插件 Introduction – Versions Maven Plugin versions插件用于管理、模块、依赖和插件的版。该插件有很多目标为了统一管理父子项目版本号我们这里只用其中三个。 操作很简单首先在父工程中引入versions插件 !-- 父POM中增加插件 -- buildpluginsplugingroupIdorg.codehaus.mojo/groupIdartifactIdversions-maven-plugin/artifactIdversion2.16.2/versionconfigurationgenerateBackupPomsfalse/generateBackupPoms/configuration/plugin/plugins /build 然后更新父工程的版本号 mvn versions:set -DnewVersion2.0.0-SNAPSHOT //更新整个项目版本 接着把子模块的版本更新成父工程的版本号 mvn versions:update-child-modules 最后提交 mvn versions:commit 4.  BOM 对于一个项目来说使用“库”中的一个或多个构件是相当常见的。为了使项目中使用的构件的版本与库中分发的版本保持同步。我们可以创建一个“物料清单”BOM以供其它项目使用。 简单的来讲就是多个项目都需要依赖某些包时为了方便管理版本使得多个项目中引用的某个包的版本保持一致这个时候我们就定义一个“库”在这个库中统一定义包的版本使用的时候只需要导入这个库即可。 举个例子 定义一个库其实就是一个POM project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.test/groupIdartifactIdmytest-bom/artifactIdversion1.0.0/versionpackagingpom/packagingpropertiesproject1Version1.0.0/project1Versionproject2Version1.0.0/project2Version/propertiesdependencyManagementdependenciesdependencygroupIdcom.test/groupIdartifactIdproject1/artifactIdversion${project1Version}/version/dependencydependencygroupIdcom.test/groupIdartifactIdproject2/artifactIdversion${project2Version}/version/dependency/dependencies/dependencyManagement /project 然后定义两个项目project1和project2 project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdcom.test/groupIdartifactIdmytest-bom/artifactIdversion1.0.0/version/parentgroupIdcom.test/groupIdartifactIdparent/artifactIdversion1.0.0/versionpackagingpom/packagingdependencyManagementdependenciesdependencygroupIdorg.apache.logging.log4j/groupIdartifactIdlog4j-core/artifactIdversion2.22.0/version/dependency/dependencies/dependencyManagement/project project1 project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdcom.test/groupIdartifactIdparent/artifactIdversion1.0.0/version/parentgroupIdcom.test/groupIdartifactIdproject1/artifactIdversion${project1Version}/versionpackagingjar/packagingdependenciesdependencygroupIdorg.apache.logging.log4j/groupIdartifactIdlog4j-core/artifactId/dependency/dependencies /project project2 project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdcom.test/groupIdartifactIdparent/artifactIdversion1.0.0/version/parentgroupIdcom.test/groupIdartifactIdproject2/artifactIdversion${project2Version}/versionpackagingjar/packaging /project 最后在其它项目中引用project1和project2 project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.test/groupIdartifactIduse/artifactIdversion1.0.0/versionpackagingjar/packagingdependencyManagementdependenciesdependencygroupIdcom.test/groupIdartifactIdmytest-bom/artifactIdversion1.0.0/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagementdependenciesdependencygroupIdcom.test/groupIdartifactIdproject1/artifactId/dependencydependencygroupIdcom.test/groupIdartifactIdproject2/artifactId/dependency/dependencies /project 可以看到使用的时候直接导入这个POM然后按需引用 核心就是在一个公共的pom中定义包的版本和依赖管理然后在使用的时候导入公共pom 假设现在在做一个项目其中有两个子项目在cjs-store-service中需要引用cjs-workflow-provider-api 先定义一个公共的pom ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.example/groupIdartifactIdcjs-dependencies-bom/artifactIdversion1.0.0-SNAPSHOT/versionpackagingpom/packagingpropertiesstore.version0.0.4-SNAPSHOT/store.versionworkflow.version0.0.3-SNAPSHOT/workflow.version/propertiesdependencyManagementdependenciesdependencygroupIdcom.example/groupIdartifactIdcjs-store-provider-api/artifactIdversion${store.version}/version/dependencydependencygroupIdcom.example/groupIdartifactIdcjs-workflow-provider-api/artifactIdversion${workflow.version}/version/dependency/dependencies/dependencyManagement/project 项目中引用 ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersionparentgroupIdcom.example/groupIdartifactIdcjs-store/artifactIdversion0.0.4-SNATHOST/version/parentgroupIdcom.example/groupIdartifactIdcjs-store-service/artifactIdversion0.0.4-SNATHOST/versiondependenciesdependencygroupIdcom.example/groupIdartifactIdcjs-store-dto/artifactIdversion${project.parent.version}/version/dependencydependencygroupIdcom.example/groupIdartifactIdcjs-workflow-provider-api/artifactId/dependency/dependencies!-- 如果父工程cjs-store的parent不是cjs-dependencies-bom则这里需要import否则不需要因为可以直接通过继承得到 --dependencyManagementdependenciesdependencygroupIdcom.example/groupIdartifactIdcjs-dependencies-bom/artifactIdversion1.0.0-SNAPSHOT/versiontypepom/typescopeimport/scope/dependency/dependencies/dependencyManagement /project 其实这种依赖包管理可以学习一下dubbo 5.  项目启动问题 如果你的springboot项目起不来控制台也不打印任何报错信息就像这样 那么你可以在SpringApplication.run()这一行打断点 然后就可以看到报错了
http://www.dnsts.com.cn/news/176413.html

相关文章:

  • wordpress网站生成app做那类网站赚钱
  • 南京专业网站设计公司价格深圳做手机网站建设
  • 大型企业网站建设美克美家网站建设
  • 怎么给网站做动图网站开发的步骤过程
  • 营销型企业网站推广的方法有哪些旅游网站品牌建设
  • 三大框架对网站开发的作用查工作单位的网站
  • 洪湖自己的网站苏州市企业排名100强
  • 广州网站建设o2oWordPress链接加前缀
  • 酷站百分百adsense用什么网站做
  • 想象力做网站标志设计网站推荐
  • 河北邢台做wap网站凤凰手机网官网
  • 手机网站开发实例高清电影下载
  • 企业网站制作方法网页美工设计案例
  • 绍兴网站建设企业ios7 风格 网站
  • seo顾问服务公司站长设计师必备的网站有哪些
  • html5集团网站网站制作中企动力
  • 网站建设重庆招聘怎样上传wordpress模板
  • ui怎样做网站移动的网络网站建设
  • 如何查看网站的关键词wordpress 搜索框插件
  • 做网站销售电话术语南京seo网站管理
  • 免费建站网站建设做图片视频的网站有哪些问题吗
  • 网站开发进度时间表网站开发课程设计报告
  • eclipse做网站代码学做电商需要什么条件
  • 沧州网站建设 3tseowordpress advantage
  • 做外贸一般看什么网站科技有限公司是什么性质
  • h5互动的网站昆明网站建设解决方案
  • 北龙建设集团有限公司企业网站百度seo和sem
  • 东莞品牌网站制作望牛墩镇做网站
  • 新手做网站免费域名wordpress没注册按钮
  • 做网站的赢利点上海微网站制作