jhipster

How can I setup my environment to use h2 for tests and mysql for development?

帅比萌擦擦* 提交于 2019-12-08 13:00:35
I'm using the default configuration for the yo jhipster generator except that I'm using mysql as my "dev" database. When I run mvn test my tests succeed with no failures. However, I found that if I ran tests a second time, the suite would fail since it would run against the "dev" database...that wasn't 'rolled back' or 'reset' after the previous test run. I would rather have expected it to run against an in-memory h2 database as configured in src/test/resources/config/application.yml that would be reset after each run. How can I setup my environment with h2 for tests and mysql for development?

How to Elasticsearch entities not created using API (jhipster)

不打扰是莪最后的温柔 提交于 2019-12-08 11:24:39
问题 Using Jhipster with Postgresql, I have created an entity "Customer". When I add data to this entity using the Angular UI or POST to the API, I can search this data using the search form on the UI. However, when I insert data in the database directly, the data is not searchable even after application restart. The search would still work (only) on the data added through the UI. I am new to elasticsearch and do not know if there is a missing step between inserting data on the backend and making

How to add new user role to jhipster(4.0.3) application

╄→尐↘猪︶ㄣ 提交于 2019-12-08 10:21:56
问题 I've created angular 2 application using Jhipster . i want use new user role like ROLE_MANAGER in my application to route him to different view after logging in, what are all the files i need to change in back-end and in UI can anyone help me. i tried changing following files not succeded, new role is not adding in database table. src\main\java\com\mycompany\myapp\security\AuthoritiesConstants.java src\main\resources\config\liquibase\authorities.csv src\main\resources\config\liquibase\users

How to implement oAuth2 along with JWT authentication in spring boot? [closed]

好久不见. 提交于 2019-12-08 09:12:25
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I am creating a spring boot web app using jhipster and mongodb as primary database. Need to implement Oauth2 for authentication along with JWT token mechanism so that every request does not hit the database for authentication. How can I implement this mechanism? 回答1: MongoDB (or

Angular PrimeNg TreeNode : convert class into TreeNode, cannot read property map of undefined

寵の児 提交于 2019-12-08 09:06:57
问题 I'm working on an application generated by JHipster and using Angular 4.3. I'm trying to use the tree component of PrimeNG I'm trying to convert an array of objects into an array of TreeNode, in order to be displayed like a tree. My typescript model looks like this : export class Continent implements BaseEntity { constructor( public id?: number, public name?: string, public countries?: Country[] ) { } I've followed this subject which describes how to convert interfaces (but in my case I have

Want to add new filter in project

断了今生、忘了曾经 提交于 2019-12-08 08:30:19
问题 I am working on hipster i have to add a new filter in my project but their is not web.xml file is avalible in project so where i am add filter with mapping. this is filter: <filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> Please

How to set base url for Angular application

假装没事ソ 提交于 2019-12-08 07:51:45
问题 I have an Angular application as generated by JHipster. By default, it runs on the root / url, and redirects to /#/ . Is there a way to override it to something else? edit Sorry, I have to rephrase my question, as it is misinterpreted in all answers below. I want to land my JHipster generated Angular application on something other than / , eg /crud/ . The purpose is to serve some non-Angular content on / . How can I move the entire application from / to /crud/ ? And still have / served by a

Angular 4 : rendering different with input type color in a form or not

China☆狼群 提交于 2019-12-08 06:45:50
问题 I'm working on an app built with JHipster and Angular 4.3. I've a problem with the use of input type color in an angular form. I need a color picker to change a color attribute. First I just displayed values of a list (ctrlColors) and a color picker, it was OK. But the users need to customize the colors, so I made a form. Now when I load my page, I don't have all the colors displayed, but only the last of the list (screen below) I've followed this simple example : input type color example

Exception deploying JHipster app to Glassfish 4.1

蹲街弑〆低调 提交于 2019-12-08 04:24:24
问题 I am trying to deploy my jHipster app war on to Glassfish and keep getting the following error.... "The lifecycle method [initApplication] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PostConstruct()] on annotated element [public void com.org.myapp.Application.initApplication() throws java.io.IOException] of type [METHOD]." Reading over some posts, it looks like a glassfish issue. I also tried the suggestions from the post 'https://github

Extending a Jhipster JWT (Spring) monolith application to support impersonation

你离开我真会死。 提交于 2019-12-08 03:33:01
问题 I have generated a jhipster angular/java application that is using JWT authentication. I now want to extend the application to support impersonation. I am interested in achieving the following: Impersonation by admin : Allowing the admin user to login as any other user Impersonation granted to user: Allowing another user that has been granted the right to impersonate a user (granted by the user itself) to login as that other user. Audit - recording changes (audit function) - the audit trail