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

商城网站流程仿淘宝网站源码+php

商城网站流程,仿淘宝网站源码+php,网站的首页文案,上海网站建设在哪在进行java开发时经常遇到一种情况#xff0c;就是windows下和linux下需要引入的jar包是不一样的。 比如说我们需要使用java来操作OpenGL库#xff0c;我们就需要通过maven引入JOGL的依赖#xff0c; 然而在window下和在linux下需要引入JOGL的依赖是不一样的#xff1a; …在进行java开发时经常遇到一种情况就是windows下和linux下需要引入的jar包是不一样的。 比如说我们需要使用java来操作OpenGL库我们就需要通过maven引入JOGL的依赖 然而在window下和在linux下需要引入JOGL的依赖是不一样的 在window下需要引入JOGL的-win版本的依赖。在linux下则需要引入JOGL的-linux版本的依赖。 那么我们应该怎么做呢如何灵活配置和指定不同环境的依赖呢我们需要使用Maven配置文件中的 profiles 元素。 下面是一个常用的pom.xml ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0xmlns: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.xxx.xxx/groupIdartifactIdxxx-xxx/artifactIdversion1.0-SNAPSHOT/version/parentartifactIdxxx-xxx/artifactIdversion1.0-SNAPSHOT/versionpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.target/propertiesdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependency.../dependenciesbuildpluginsplugingroupIdorg.springframework.boot/groupIdartifactIdspring-boot-maven-plugin/artifactIdversion${spring-boot.version}/versionconfigurationfinalName${project.artifactId}/finalNamelayersenabledtrue/enabled/layersincludeSystemScopetrue/includeSystemScope/configurationexecutionsexecutiongoalsgoalrepackage/goal/goals/execution/executions/pluginplugingroupIdorg.apache.maven.plugins/groupIdartifactIdmaven-surefire-plugin/artifactIdversion2.20.1/versionconfigurationskipTeststrue/skipTests/configuration/plugin/plugins/build /project现在我需要操作OpenGL在开发时是win环境amd64需要加入如下依赖: dependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependency但是上生产的时候是运行在Linux上的则需要将上述依赖改为Linux的如下: dependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependency那么如何通过maven的配置来指定使用哪个依赖呢则需要使用 Maven 的Profiles在pom中添加如下配置 dependencies.../dependenciesprofilesprofileidwin/idpropertiesprofileActivewin/profileActivedb.urljdbc:mysql://localhost/win_db/db.url/propertiesactivationactiveByDefaulttrue/activeByDefault!-- 根据属性值激活 --propertynameenv/namevaluetest/value/property/activationdependenciesdependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-windows-amd64/classifier/dependency/dependencies/profileprofileidlinux/idpropertiesprofileActivelinux/profileActivedb.urljdbc:mysql://localhost/linux_db/db.url/propertiesactivationactiveByDefaultfalse/activeByDefault!-- 根据属性值激活 --propertynameenv/namevalueprd/value/property/activationdependenciesdependencygroupIdorg.jogamp.jogl/groupIdartifactIdjogl-all/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependencydependencygroupIdorg.jogamp.gluegen/groupIdartifactIdgluegen-rt/artifactIdversion2.3.2/versionclassifiernatives-linux-amd64/classifier/dependency/dependencies/profile/profilesid 元素用于给 Profile 分配一个唯一的标识符使用maven构建时根据此id选择需要激活的环境。properties元素自定义的属性不同的 Profile 被激活时里面的配置将被设置为不同的值在其他地方可以获取到并使用改属性比如在资源文件中使用 ${} 格式的占位符引用属性的值profileActive${profileActive} db.url${db.url}activation 元素 定义了 Profile 的激活条件。 activeByDefault元素表示是否默认激活设置为 true表示在没有明确指定其他 Profile 时该配置将自动激活可以使用命令mvn clean package -Pwin或mvn clean package -Plinux来指定对应的profile id。property元素根据属性 env 的值来激活可以使用命令-Denvtest或-Denvprd来激活。 dependencies元素该环境下对应的依赖。build元素该环境下的构建选项。......其他元素用处不多不展开介绍。 正如上面所说这时候在构建时就可以指定选项来打包不同的依赖了 通过profile id打包 mvn clean package -Pwin通过自定义环境变量打包 mvn clean package -Denvtest
http://wiki.neutronadmin.com/news/106006/

相关文章:

  • 小学网站建设报告麻涌网站建设
  • 营销型网站建设营销型手机开发者选项怎么打开
  • 南山网站建设深圳信科怎么注册公司税最低
  • 东莞建站公司运转全网天下有 名wordpress 仿花瓣
  • 学校网站建设工作计划电子商务网站建设的核心多选
  • 营销型网站规划抖音宣传推广
  • 网站套餐到期什么意思海外网站cdn加速下载
  • 怎么做网站结构拓扑图wordpress 文章表
  • 惠州网站建设惠州建设劳务公司注册条件
  • 专业网站设计推荐深圳网络营销推广培训
  • asp网站安装解决方案
  • 网站设计的网站赣州是哪个省
  • app推广多少钱一个宿州网站建设优化
  • 如何建立一个小程序的网站wordpress首页改颜色
  • 网页网站建设软件网站建设高端培训学校
  • 深圳福田园岭网站建设如何建设公司的网站首页
  • 福州网站建设索q4791857002022重大时政热点事件简短
  • 淘宝客网站免费建站建筑工程网络设计
  • 网站建设用图制作音乐排行榜html5
  • 云南微网站建设的公司有哪些咨询公司怎么注册
  • 移动端网站建设的尺寸广西明电建设有限公司网站
  • 流行网站设计做婚庆网站有哪些内容
  • 网站建设贵苏州网络
  • 做网站公司费用wordpress的标题字体大小
  • 如何在网站后台备份数据库表网站建设氺金手指排名15
  • 权威的南昌网站建设是wordpress
  • dede5.7模板 新闻文章网站源码什么网站都有漏洞
  • 沈阳 网站制作报价网页制作自学教程
  • 广西建设厅招投标中心网站如何在百度上发布自己的广告
  • 安徽省住房与城乡建设网站网站制作一年多少钱