未找到本地主机/加密返回,但一切都已配置

问题描述

我是 Spring Cloud 的新手,目前我正在创建简单的配置服务器。 现在我正在进行加密步骤,我已经在 jdk1.8 文件夹中安装了 JCE,我也有代码

application.yml

server:
  port: 8888
  servlet:
    context-path: /

spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/genadigeno/config-server.git
          search-paths:
            - 'station*'
          repos:
            perf:
              pattern:
                - "*/perf"
              uri: https://github.com/genadigeno/performance-test.git
              search-paths:
                - 'station*'

bootstrap.properties

encrypt.key=ABCDEFGHIJKLMnopQRSTUVWYXZ

而且我还禁用了 csrf 以进行帖子请求,并且它可以工作。 问题是当我发送 post 请求时:localhost:8888/ecnrypt 它返回 404 错误代码

这是图片

enter image description here

解决方法

您的网址有误:ecnrypt 应该是 encrypt