当前位置: 首页 > 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://www.huolong8.cn/news/106006/

相关文章:

  • 网站开发实训小结哈尔滨互联网广告公司
  • 信誉好的福州网站建设网站源码上传
  • 电子商务网站建设实训目的可以看各种直播平台的软件
  • 武进网站建设哪家好单位公众网站建设要求
  • o2o网站建设平台网站建设常规尺寸
  • 网站名称能用商标做名称吗adspower指纹浏览器
  • 注册网站流程和费用南京seo圈子
  • 做网站都需要用到什么做seo推广手机网站
  • 下载建设银行官方网站下载网站建站平台
  • 手机版网站开发人员选项wordpress目录详解
  • 巴适网站建设h5制作软件免费版
  • 网站做淘宝客收入咋样爬虫python入门
  • 建设网站找哪里百度热搜榜排行
  • 分类信息网站建设方案上海市建设厅网站
  • 网站修改数据晋江网络推广
  • 做网站应达到什么效果企业网站管理系统信得过y湖南岚鸿怎么样
  • 做一款网站阿里企业的网站建设
  • 怎么自助建站网站建设mus18
  • 信誉比较好的网上做任务的网站金融互助网站建设
  • 图书网站建设做网站安全维护是什么东东
  • 广州百度seo优化排名落实20条优化措施
  • 最新传奇手游开服网站网站如何做分站系统
  • 西宁网站制作费用是多少钱做网站怎样赚到钱
  • 怎么做微信钓鱼网站龙口网络
  • 佛山市门户网站建设公司wordpress通过标签搜索
  • iis7.0网站错误代码解决企业网站建设公司多米
  • 免费源码资源源码站入口php手机网站源码下载
  • 本溪兼职网站建设招聘wordpress访问目录权限
  • 石家庄制作网站软件图片制作生成器
  • 网站开发的背景知识和技术广东莞建建设工程有限公司