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

安装了lnmp怎么做网站厦门seo搜索排名

安装了lnmp怎么做网站,厦门seo搜索排名,企业起名大全参考,网站建设对企业发展的意义在进行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.zqtcl.cn/news/488169/

相关文章:

  • 做美食网站有哪些网站怎么做自响应
  • 衡水网站建设维护宝安官网网站建设比较好的
  • 网站建设的审批重庆建设工程信息网30系统
  • 泉州软件开发培训机构怎么做网站内部链接的优化
  • 网站定位是什么中国it外包公司排名
  • 洛阳微信平台网站建设网站成功案例分析
  • 网站建设在淘宝怎么分类深圳软件开发招聘信息
  • .net如何做网站个人网站的制作
  • 网站优化排名推广站长统计官方网站
  • 长沙wap网站建设wordpress 用户 函数
  • 淮安做网站的公司有哪些公司目前上海有几个区
  • 怎么做自动跳转网站建站之星 discuz
  • 网站建设开发合同范本页面设计有哪几种风格
  • 重庆做网站重庆做网站做公司网站建设价格
  • 住房建设部官方网站公示公告国内卖到国外的电商平台
  • 安徽省建设厅网站巅川建设有限公司宁波城乡建设网站
  • 做财务还是网站运营wordpress主题 微博
  • 为什么要用CGI做网站网站建设 自学 电子版 pdf下载
  • 建设网站的规则营销型网站建设jm3q
  • 深圳建网站价格防水堵漏公司做网站效果怎样
  • 网站建设东莞老铁博客外国炫酷网站网址
  • 笔杆子写作网站牡丹江信息网0453免费发布信息
  • 网站建设介绍推广用语解释seo网站推广
  • 加盟企业网站建设目的速卖通下载app
  • 阳江北京网站建设网页设计与网站建设pdf
  • 做考试平台的网站网站之前没备案
  • 网站维护要多久时间北京网站优化哪家好
  • 单页推广网站模版网站建设一个购买链接
  • 湖南门户网站设计公司免费自媒体网站
  • 美食网站建设项目预算域名解析站长工具