hb0730 / boot-admin

BOOT-ADMIN是一个基于Spring Boot3和Vue3 的开源项目,项目采用前后端分离的模式,前端框架使用vue-pure-admin
MIT License
250 stars 84 forks source link

boot-admin和boot-admin-ui怎么配置才能正常登录? #4

Closed keith-ch closed 2 years ago

keith-ch commented 2 years ago

前端项目和后端项目均在本地启动, 前端配置如下: proxy: { '/': { target: 'http://localhost:8080', //目标接口域名 secure: false, //false为http访问,true为https访问 changeOrigin: true, //是否跨域 pathRewrite: { '^/': '' //重写接口 } 后端配置: server: port: 8080 spring: application: name: boot-admin-3.0.0

Administrator/123456 登录页面弹窗显示: Network Error 后台无任何日志输出。

keith-ch commented 2 years ago

前端配置中修改为不跨域: changeOrigin: false, //是否跨域 启动后访问: 依然是 Network Error

但是后台有日志输出了: org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource at org.springframework.security.web.access.ExceptionTranslationFilter.handleSpringSecurityException(ExceptionTranslationFilter.java:189) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:140) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

keith-ch commented 2 years ago

能否写一个简单的启动文档,按照步骤操作,确保能够成功登录进去。 另外,演示网站: https://admin.hb0730.com 使用Administrator/123456登录,也是显示Network Error

hb0730 commented 2 years ago

演示网站是因为启用了 image 观点就可以了,

如何正常访问问题:

  1. 首先正确配置前端项目*.env
  2. 后台项目所需的依赖如:redis,mysql等
hb0730 commented 2 years ago

前端本地 image

启动命令为npm run serve

hb0730 commented 2 years ago

前端配置中修改为不跨域: changeOrigin: false, //是否跨域 启动后访问: 依然是 Network Error

但是后台有日志输出了: org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access this resource at org.springframework.security.web.access.ExceptionTranslationFilter.handleSpringSecurityException(ExceptionTranslationFilter.java:189) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:140) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)

这是可能访问了受spring security保护的资源了

keith-ch commented 2 years ago

前端本地 image

启动命令为npm run serve

配置了env文件,终于进去了,谢谢。 如果能在Readme中加上这些指导,那就更好了。

hb0730 commented 2 years ago

前端本地 image 启动命令为npm run serve

配置了env文件,终于进去了,谢谢。 如果能在Readme中加上这些指导,那就更好了。

这个我觉着应该不需要写,因为前端项目已经根据环境去区分了只要熟悉启动过程加载什么文件就明白了

keith-ch commented 2 years ago

像我,只懂得后端开发,前端知之甚少。 但我也想用大佬搞的这个项目,这就很需要指导了。