我用下面的代码修改我的home.route.ts:
export const HOME_ROUTE: Route = {
path: '',
component: HomeComponent,
data: {
authorities: ['ROLE_USER', 'ROLE_ADMIN'],
pageTitle: 'home.title'
},
canActivate: [UserRouteAccessService]
};但是,在终端日志中,我看到每毫秒都会出现大量错误:
2020-04-28 15:01:31.284 DEBUG 3588 --- [ XNIO-1 task-66] c.m.m.r.CustomAuditEventRepository : Exit: add() with result = null
2020-04-28 15:01:31.285 WARN 3588 --- [ XNIO-1 task-66] o.z.problem.spring.common.AdviceTraits : Unauthorized: Full authentication is required to access this resource
2020-04-28 15:01:31.286 WARN 3588 --- [ XNIO-1 task-66] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.security.authentication.InsufficientAuthenticationException: Full authentication is required to access
this resource]在访问路径'‘之前,最好的登录方式是什么?
对不起,我的基本英语,我的第一种语言是法语。
发布于 2020-04-29 06:01:07
我最近在Angular的一个JHipster应用程序中遇到了类似的情况。
这是由于页面布局中包含了几个需要了解用户的组件:导航栏、开发功能区……
默认情况下,JHipster使用登录表单的模式,这意味着此弹出窗口显示在包含我上面提到的布局组件的页面中。
我的解决方案是创建一个在/login路由上映射了简化布局(例如,没有导航栏)的登录屏幕。
https://stackoverflow.com/questions/61488110
复制相似问题