Angular 需要先登录,然后才能转到“登录”/&引用;
我用以下命令更改home.route.ts:Angular 需要先登录,然后才能转到“登录”/&引用;,angular,typescript,jhipster,Angular,Typescript,Jhipster,我用以下命令更改home.route.ts: export const HOME_ROUTE: Route = { path: '', component: HomeComponent, data: { authorities: ['ROLE_USER', 'ROLE_ADMIN'], pageTitle: 'home.title' }, canActivate: [UserRouteAccessService] }; 但是,在终端日志中,我每毫秒就会看到大
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]
在访问路径“”之前登录的最佳方式是什么
对不起,我的基础英语,我的第一门语言是法语。我最近在日本的JHipster应用程序中体验到了类似的体验 这是因为页面布局中包含的组件很少需要了解用户:导航栏、开发功能区 默认情况下,JHipster对登录表单使用一个模式,这意味着这个弹出窗口显示在一个包含我上面提到的布局组件的页面中
我的解决方案是在
/login
路线上创建一个带有简化布局(例如没有导航栏)的登录屏幕。嗨!指定询问新问题时使用的语言(如果是带有typescript的节点,则指定该语言):)