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 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
  • ¥50 invest生境质量模块