Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 需要先登录,然后才能转到“登录”/&引用;_Angular_Typescript_Jhipster - Fatal编程技术网

Angular 需要先登录,然后才能转到“登录”/&引用;

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] }; 但是,在终端日志中,我每毫秒就会看到大

我用以下命令更改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]
在访问路径“”之前登录的最佳方式是什么


对不起,我的基础英语,我的第一门语言是法语。

我最近在日本的JHipster应用程序中体验到了类似的体验

这是因为页面布局中包含的组件很少需要了解用户:导航栏、开发功能区

默认情况下,JHipster对登录表单使用一个模式,这意味着这个弹出窗口显示在一个包含我上面提到的布局组件的页面中


我的解决方案是在
/login
路线上创建一个带有简化布局(例如没有导航栏)的登录屏幕。

嗨!指定询问新问题时使用的语言(如果是带有typescript的节点,则指定该语言):)