linux打包的时候出现的奇葩问题

奇葩问题

1.Linux打的war包在linux上无法运行,在windows上能运行

2.windows打的war包在windows上可以运行,在linux上也可以运行.


elasticsearch的netty依赖问题

项目中使用elasticsearch(版本号:5.3.0),服务器在运行后表现形式就是:NoNodeAvailableException[None of the configured nodes are available ] ,经查是elasticsearch的netty4的版本有问题。elasticsearch当前服务器使用的版本是5.3.0是netty4 4.1.7.Final。此netty版本低一个版本号都不行。POM依赖如下:

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-buffer</artifactId>
      <version>4.1.7.Final</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>io.netty</groupId>
          <artifactId>netty-common</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

spring无法读取properties的问题

spring在location配置文件的时候,有时候图简单会采用classpath:*.properties,这种写法有时候会导致linux的编译问题。解决此问题只需要讲location的配置文件写成每个对应的配置文件名就行了。

    <bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:component.properties</value>
            </list>
        </property>
    </bean>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值