dyc87112 / spring-cloud-config-admin

Spring Cloud Config的综合管理后台(简称:SCCA)
https://dyc87112.github.io/spring-cloud-config-admin-doc/
Apache License 2.0
658 stars 262 forks source link

用postman测试登录可以返回success,但是用scca-ui-server-git去从前端登录返回401 #156

Open newWSmile opened 5 years ago

newWSmile commented 5 years ago

使用scca-use-case-git 里面full-separation 三个项目

· scca-config-server-git

spring.application.name=scca-config-server-git
server.port=10110

eureka.client.serviceUrl.defaultZone=http://192.168.1.53:1111/eureka/

spring.cloud.config.server.git.uri=https://gitee.com/didispace/{application}.git
spring.cloud.config.server.git.username=
spring.cloud.config.server.git.password=
spring.cloud.config.server.git.search-paths=/scca-repo
spring.cloud.config.server.prefix=

encrypt.key=didispace.com
scca.git.file-pattern=application-{profile}.properties,application-{profile}.yaml,application-{profile}.yml
scca.git.file-charset=UTF-8

· scca-rest-server-git


spring.application.name=scca-rest-server-git
server.port=10130

eureka.client.serviceUrl.defaultZone=http://192.168.1.*:1111/eureka/

spring.datasource.url=jdbc:mysql://192.168.1.*:3306/smile?autoReconnect=true
spring.datasource.username=*
spring.datasource.password=*
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

spring.jpa.hibernate.ddl-auto=update

scca.rest.context-path=/xhr
scca.ui.use-embed-scca-rest-server=true

· scca-ui-server-git


spring.application.name=scca-ui-server
server.port=12000

scca.ui.rest-server-url=http://localhost:10130
scca.ui.rest-server-context-path=/xhr

以上配置启动后,从http://localhost:12000 去访问 登录用户名默认的admin/spring4all debug显示401 登录验证失败,现在我去前端使用怎么都跳不过验证 也看了scca-rest这边的SccaUserDetailsService 发现能找到数据返回,但是后续直接进入SccaAuthenticationFailureHandler里面去了返回返回login failure 401 大佬们,救救孩子吧

newWSmile commented 5 years ago

@dyc87112

newWSmile commented 5 years ago

image 这个里面正常返回 没有问题

newWSmile commented 5 years ago

现在采用full-separation 的scca-config-server-git 模块 和half-separation的scca-ui-rest-server-git 模块就可以成功跑起来了 但是我看了具体的依赖也是依赖的核心scca-rest 配置也是差不多 。这个问题有待大佬告知

AnoyiX commented 5 years ago

暂时使用 All-IN-ONE 模式,谢谢,分离模式确实存在权限的问题