• springcloud 中开启了https协议


    在springcloud 中开启了https协议后,虽然编译成功,但运行项目一直报错,报错信息如下:

    Failed to start end point associated with ProtocolHandler [https-jsse-nio-1443]

     java.lang.IllegalArgumentException: java.io.IOException: DerInputStream.getLength(): lengthTag=111, too big.

             at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:103) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

             at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:81) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

             at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:244) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

             at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:874) ~[tomcat-embed-core-8.5.6.jar:8.5.6]

    检查后发现其他配置都没问题,

    将 pom文件中的 build 插件将原来的配置:

    <build>
       <plugins>
          <plugin>
             <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
           <executions>
               <execution>
                   <id>default-resources</id>
                   <phase>validate</phase>
                   <goals>
                       <goal>copy-resources</goal>
                   </goals>
                   <configuration>
                       <outputDirectory>target/classes</outputDirectory>
                       <useDefaultDelimiters>false</useDefaultDelimiters>
                       <delimiters>
                           <delimiter>#</delimiter>
                       </delimiters>
                       <resources>
                           <resource>
                               <directory>src/main/resources/</directory>
                               <filtering>true</filtering>
                           </resource>
                           <resource>
                               <directory>src/main/resources.${spring.profiles.active}</directory>
                               <filtering>false</filtering>
                           </resource>
                       </resources>
                   </configuration>
               </execution>
           </executions>
       </plugin>
       </plugins>
    </build>

     

    改成:

    <build>
       <finalName>${artifactId}</finalName>
       <plugins>
          <plugin>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-maven-plugin</artifactId>
          </plugin>
       </plugins>
       <resources>
          <resource>
             <directory>src/main/resources</directory>
             <includes>
                <include>**/*.xml</include>
                <include>**/*.yml</include>
                <include>**/*.properties</include>
                <include>*</include>
             </includes>
             <filtering>false</filtering>
          </resource>
          <resource>
             <directory>src/main/java</directory>
             <includes>
                <include>**/*.xml</include>
             </includes>
             <filtering>false</filtering>
          </resource>
       </resources>
    </build>

    重新编译后 运行 项目运行不报错。 原因可能是: 第一个编译插件将p12文件内容更改了。

  • 相关阅读:
    POJ 2155:Matrix 二维树状数组
    POJ 2823:Sliding Window 单调队列
    POJ 3007:Organize Your Train part II
    51nod 1208 && POJ 2482:Stars in Your Window
    POJ 3061:Subsequence 查找连续的几个数,使得这几个数的和大于给定的S
    51nod 1206:Picture 求覆盖周长
    POJ 1195:Mobile phones 二维树状数组
    lightoj 1319
    暴力大法好
    Poj1273--Drainage Ditches(最大流)
  • 原文地址:https://www.cnblogs.com/fishjar/p/10554070.html
Copyright © 2020-2023  润新知