jhipster

Jhipster CORS enable

天涯浪子 提交于 2021-01-28 03:11:18
问题 I am using Jhipster to generate API. My api is on lets call it : https://api.staging.test.com/ and my FE app is on : https://staging.test.com/ Here is my config for Cors enable in application-prod.yml cors: allowed-origins: "https://staging.test.com/" allowed-methods: "*" allowed-headers: GET, PUT, POST, DELETE, OPTIONS exposed-headers: "Authorization,Link,X-Total-Count" allow-credentials: true max-age: 1800 I still get this error : Response to preflight request doesn't pass access control

Infinite loop when checking roles. VueJS

ぃ、小莉子 提交于 2021-01-28 01:33:32
问题 There is a navigation bar where elements are displayed depending on the user's role: <b-navbar-toggle right class="jh-navbar-toggler d-lg-none" href="javascript:void(0);" data-toggle="collapse" target="header-tabs" aria-expanded="false" aria-label="Toggle navigation"> <font-awesome-icon icon="bars"/> </b-navbar-toggle> <b-collapse is-nav id="header-tabs"> <b-navbar-nav class="ml-auto"> <b-nav-item-dropdown right id="pass-menu" v-if="hasAnyAuthority('ROLE_USER') && authenticated" :class="{

JHipster support websockets in microservice architecture

落花浮王杯 提交于 2021-01-27 20:20:39
问题 I tried to implement websockets in one of the microservices in my project. However, I found out the Zuul proxy doesn't support websockets by default and jhipster developers is recommending adding websockets to gateway project as in https://github.com/jhipster/generator-jhipster/issues/7335 . Are there any better solution for this problem using a different proxy that will allow adding websockets to microservice? 来源: https://stackoverflow.com/questions/50679665/jhipster-support-websockets-in

How do I know which jhipster version I am using?

北慕城南 提交于 2021-01-20 20:11:45
问题 I need to duplicate a jhipster project. Since I have created this project I have updated jhipster versions. I want to duplicate the project with the same jhipster version of the first project. How do I know which version of Jhipster I am using on my first application? 回答1: The best place to find this information seems to be the first line of ./Gruntfile.js: // Generated on 2015-12-14 using generator-jhipster 2.25.0 The identifier of the version used to generate the project can be found in a

How do I know which jhipster version I am using?

a 夏天 提交于 2021-01-20 20:07:54
问题 I need to duplicate a jhipster project. Since I have created this project I have updated jhipster versions. I want to duplicate the project with the same jhipster version of the first project. How do I know which version of Jhipster I am using on my first application? 回答1: The best place to find this information seems to be the first line of ./Gruntfile.js: // Generated on 2015-12-14 using generator-jhipster 2.25.0 The identifier of the version used to generate the project can be found in a

How do I know which jhipster version I am using?

喜欢而已 提交于 2021-01-20 20:07:11
问题 I need to duplicate a jhipster project. Since I have created this project I have updated jhipster versions. I want to duplicate the project with the same jhipster version of the first project. How do I know which version of Jhipster I am using on my first application? 回答1: The best place to find this information seems to be the first line of ./Gruntfile.js: // Generated on 2015-12-14 using generator-jhipster 2.25.0 The identifier of the version used to generate the project can be found in a

How do I know which jhipster version I am using?

江枫思渺然 提交于 2021-01-20 20:06:37
问题 I need to duplicate a jhipster project. Since I have created this project I have updated jhipster versions. I want to duplicate the project with the same jhipster version of the first project. How do I know which version of Jhipster I am using on my first application? 回答1: The best place to find this information seems to be the first line of ./Gruntfile.js: // Generated on 2015-12-14 using generator-jhipster 2.25.0 The identifier of the version used to generate the project can be found in a

JHipster *jhiHasAnyAuthority directive check for “no authority”

£可爱£侵袭症+ 提交于 2021-01-07 06:41:45
问题 I need to make a condition that is seen when the user has no authority (it is not logged in), but I need to check for that authority first, so when the user is logged in, I will not see the content. I'm using the 'jhiHasAnyAuthority' directive from the JHipster project. <div *jhiHasAnyAuthority="''">This should appear.... when the VISITOR is NOT logged </div> This works when there is an authority (in case you wonder): <div *jhiHasAnyAuthority="['ROLE_ADMIN', 'ROLE_USER']">This should appear..

Ckfinder problem, how to disable token csrf in spring boot with OAuth2 (Jhipster)

99封情书 提交于 2021-01-07 06:34:57
问题 I develop a project with Jhipster framework (Angular 10 + Spring boot) and I have need a file manager. So I was choose Ckfinder. The server side in java works well in a microservice (Before, I have generated Jhipster microservice and I have adapted with sping boot app). The client side of ckfinder is already inside the dependency. So when I test the microservice on the host "http://localhost:8090/" all works. But I want to pass by my gateway, So I test on "http://localhost:8080/service/media/

Multiple roles using @PreAuthorize

浪尽此生 提交于 2020-12-10 07:54:12
问题 To check multiple roles has the method level access I have used @PreAuthorize annotation to check the role @PreAuthorize("hasRole(\"" + AuthoritiesConstants.USER + "\",)" ) How to check multiple roles using @PreAuthorize annotaion? 回答1: You can create a custom annotation to validate many roles and conditions. P.e.: @Retention(RetentionPolicy.RUNTIME) @PreAuthorize("hasRole(T(com.bs.dmsbox.api.constants.RoleConstants).ROLE_AGENT) " + "|| hasRole(T(com.bs.dmsbox.api.constants.RoleConstants)