Java 当我尝试访问我的应用程序起始页时,出现意外的登录屏幕

Java 当我尝试访问我的应用程序起始页时,出现意外的登录屏幕,java,spring-boot,spring-mvc,google-app-engine,google-cloud-platform,Java,Spring Boot,Spring Mvc,Google App Engine,Google Cloud Platform,我将我的第一个应用程序部署到谷歌应用程序引擎标准。经过几次失败的尝试,它终于开始了。但是当我试图访问它的起始页时,我重定向到了登录表单(我不熟悉,所以我想它是由GCP提供的)。 我不明白我的申请有什么问题,有没有人有过类似的经历?有人对可能发生的事情有什么建议吗 我将已经运行的Spring Boot应用程序迁移到GCP云 应用类型:Spring Boot 2 身份验证类型:基于应用程序,由Spring提供 pom.xml 4.0.0 org.springframework.boot 似乎是我自

我将我的第一个应用程序部署到谷歌应用程序引擎标准。经过几次失败的尝试,它终于开始了。但是当我试图访问它的起始页时,我重定向到了登录表单(我不熟悉,所以我想它是由GCP提供的)。 我不明白我的申请有什么问题,有没有人有过类似的经历?有人对可能发生的事情有什么建议吗

我将已经运行的Spring Boot应用程序迁移到GCP云 应用类型:Spring Boot 2 身份验证类型:基于应用程序,由Spring提供

pom.xml


4.0.0
org.springframework.boot

似乎是我自己在试图避免另一个问题时造成了这个问题:spring factory找不到任何存储库接口:我将所有配置内容从应用程序类移动到了单独的配置,并且应用程序上下文似乎根本没有在app engine中初始化


但存储库扫描的问题仍然没有解决。

似乎是我自己在试图避免另一个问题时造成的:spring factory找不到任何存储库接口:我将所有配置内容从应用程序类移动到了单独的配置,而应用程序上下文似乎没有在app engine中初始化一点也不


但存储库扫描的问题仍然没有解决。

我发现了所有问题的根源:appengine-web.xml中的以下块:


真的

这导致Spring Jpa无法定位存储库接口。

我发现了所有问题的根源:appengine-web.xml中的以下块:


真的

这导致Spring Jpa无法定位存储库接口。

如果我们假设根url是您的登录页,您应该使用类似以下内容的antMatcher:
.antMatchers(“/**”).permitAll()
。您的登录页的url是什么?可能位于安全路径下。如果我们假定根url是您的登录页,您应该使用类似以下内容的antMatcher:
.antMatchers(“/**”).permitAll()
。您的登录页的url是什么?可能处于安全路径下如果问题已解决但您有其他问题,则应指定此新问题编辑问题或仅创建新帖子。如果问题已解决但您有其他问题,则应指定此新问题编辑问题或仅创建新帖子。嘿,Mykola!如果你的答案适合你,你能接受与你文章主要问题相关的答案吗?这样,它将获得更好的可视性,并将帮助其他有类似问题的用户=)!嘿,Mykola!如果你的答案适合你,你能接受与你文章主要问题相关的答案吗?这样,它将获得更好的可视性,并将帮助其他有类似问题的用户=)!
spring.cloud.app-id=whatnwhere-south-post-1336


spring.datasource.initialization-mode=always
spring.datasource.hikari.maximum-pool-size=2

connection.host=google
connection.db.name=<database name>
connection.instance-connection-name=<connection name>
spring.datasource.url=jdbc:mysql://${connection.host}/${connection.db.name}?cloudSqlInstance=${connection.instance-connection-name}&socketFactory=com.google.cloud.sql.mysql.SocketFactory&useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Europe/Kiev
spring.datasource.username=<db user name>
spring.datasource.password=<db passord>
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

view.grid.rows.per.page=10
view.grid.paging.neighbours=3
password.encoder.strength=11

spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=<sender-account e-mail>
spring.mail.password=**********
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

spring.mvc.locale=uk_UA
spring.mvc.locale-resolver=fixed

lookup.batch.size=10

logging.file=${user.home}/what-where/server.log
spring.liquibase.change-log=classpath:/db/liquibase/changelog.xml
spring.jpa.hibernate.ddl-auto=none

spring.jpa.show-sql=false
spring.jpa.properties.hibernate.format_sql=false

logging.level.org.hibernate.SQL=WARNING
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=WARNING


security.token.validity.seconds=1209600

security.default.authentication.success.url=/user/profile/welcome
security.supervisor.authentication.success.url=/user/admin/list
security.administrator.authentication.success.url=/user/admin/list
security.operator.authentication.success.url=/vacancy/list
security.viewer.authentication.success.url=/user/profile/welcome

handlers:
  - url: /.*
    script: this field is required, but ignored

automatic_scaling:
  min_num_instances: 1
  max_num_instances: 5

resources:
  cpu: 2
  memory_gb: 2.3
  disk_size_gb: 10
  volumes:
    - name: ramdisk1
      volume_type: tmpfs
      size_gb: 0.5