tuanguayi2860 2018-06-28 00:18 采纳率: 0%
浏览 750
已结题

MacOs系统下tomcat无法正常运行war包,properties读取报格式错误

最近换电脑,原本项目从windows系统迁移至mac系统,但是比较奇怪,web项目打成war包之后,部署在tomcat 启动就会报格式错误。具体如下图片说明

我的配置如下:
图片说明

对于的xml文件配置如下:
<?xml version="1.0" encoding="UTF-8"?>
xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd"
>

<description>redis配置</description>

<context:property-placeholder ignore-unresolvable="true" location="classpath:/redis.properties" />  

    <!-- redis -->  
    <bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">  
    </bean>  

    <bean id="jedisConnectionFactory"  
        class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
        <property name="hostName" value="${redis.host}" />  
        <property name="port" value="${redis.port}" />  
        <property name="password" value="${redis.password}" />  
        <property name="timeout" value="${redis.timeout}" />  
        <property name="poolConfig" ref="jedisPoolConfig" />  
        <property name="usePool" value="true" />  
    </bean>  

    <bean id="redisTemplate" class="org.springframework.data.redis.core.StringRedisTemplate">  
        <property name="connectionFactory" ref="jedisConnectionFactory" />  
    </bean>  

    <!-- 将session放入redis -->  
    <bean id="redisHttpSessionConfiguration"  
    class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration">  
        <property name="maxInactiveIntervalInSeconds" value="1800" />  
    </bean>

非常奇怪,同样的war包我在windows 和Linux上都可以运行,唯独在mac 上运行会报格式错误,放在docker里面运行也会有相同的错误,有没有大神遇到过类似的情况啊!!!!!

  • 写回答

4条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序