После создания файла Application.yml Spring-boot использует настройки по умолчанию - PullRequest
0 голосов
/ 22 апреля 2019

После создания файла application.yml для моего сервера сервер не загружается в моем настраиваемом протоколе безопасности или на странице входа.Например, когда я перехожу к URL-адресу логина, он просто показывает логин весны по умолчанию.Когда я выполняю запрос get на URL, мой браузер не может его найти.Кроме того, ни один из маршрутов, которые работали ранее, не работал сейчас.Вот как выглядит yaml:

  mfaas:
      discovery:
          serviceId: ${environment.serviceId}
          locations: ${environment.discoveryLocations}
          enabled: ${environment.discoveryEnabled:true}
          endpoints:
              statusPage: ${mfaas.server.scheme}://${mfaas.service.hostname}:${mfaas.server.port}${mfaas.server.contextPath}/application/info
              healthPage: ${mfaas.server.scheme}://${mfaas.service.hostname}:${mfaas.server.port}${mfaas.server.contextPath}/application/health
              homePage: ${mfaas.server.scheme}://${mfaas.service.hostname}:${mfaas.server.port}${mfaas.server.contextPath}/
          info:
              serviceTitle:  ${environment.serviceTitle}
              description:  ${environment.serviceDescription}
              # swaggerLocation: resource_location_of_your_static_swagger_doc.json
          fetchRegistry: false
          region: default
      service:
          hostname: ${environment.hostname}
          ipAddress: ${environment.ipAddress}
      catalog-ui-tile:
          id: yourProductFamilyId
          title: Your API service product family title in the API catalog dashboard tile
          description: Your API service product family description in the API catalog dashboard tile
          version:  1.0.0
      server:
          scheme: http
          port: ${environment.port}
          contextPath: /yourServiceUrlPrefix

  eureka:
      instance:
          appname: ${mfaas.discovery.serviceId}
          hostname: ${mfaas.service.hostname}
          statusPageUrlPath: ${mfaas.discovery.endpoints.statusPage}
          healthCheckUrl: ${mfaas.discovery.endpoints.healthPage}
          homePageUrl: ${mfaas.discovery.endpoints.homePage}
          metadata-map:
              routed-services:
                  api_v1:
                      gateway-url: "api/v1"
                      service-url: ${mfaas.server.contextPath}
              apiml:
                  apiInfo:
                      - apiId: ${mfaas.discovery.serviceId}
                        gatewayUrl: api/v1
                        swaggerUrl: ${mfaas.server.scheme}://${mfaas.service.hostname}:${mfaas.server.port}${mfaas.server.contextPath}/api-doc
                        documentationUrl: https://www.zowe.org
              mfaas:
                  api-info:
                      apiVersionProperties:
                          v1:
                              title: Your API title for swagger JSON which is displayed in API Catalog / service / API Information
                              description: Your API description for swagger JSON
                              version: 1.0.0
                              basePackage: your.service.base.package.for.swagger.annotated.controllers
                              # apiPattern: /v1/.*  # alternative to basePackage for exposing endpoints which match the regex pattern to swagger JSON
                  discovery:
                      catalogUiTile:
                          id: ${mfaas.catalog-ui-tile.id}
                          title:  ${mfaas.catalog-ui-tile.title}
                          description: ${mfaas.catalog-ui-tile.description}
                          version: ${mfaas.catalog-ui-tile.version}
                      enableApiDoc: ${mfaas.discovery.info.enableApiDoc:true}
                      service:
                          title: ${mfaas.discovery.info.serviceTitle}
                          description: ${mfaas.discovery.info.description}
      client:
          enabled: ${mfaas.discovery.enabled}
          healthcheck:
              enabled: true
          serviceUrl:
              defaultZone: ${mfaas.discovery.locations}
          fetchRegistry:  ${mfaas.discovery.fetchRegistry}
          region: ${mfaas.discovery.region}

  server:
      # address: ${mfaas.service.ipAddress}
      port: ${mfaas.server.port}
      servlet:
          contextPath: ${mfaas.server.contextPath}

  spring:
      application:
          name: ${mfaas.discovery.serviceId}

Нужно ли использовать определенные настройки, чтобы использовать мою собственную безопасность?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...