Questions tagged [jhipster]
JHipster is a development platform to generate, develop and deploy Spring Boot, Angular/React/Vue Web applications and Spring microservices.
347
questions
9
votes
1
answer
9k
views
Can't create custom query method in Spring Data Repository [duplicate]
I wanted to create custom repository :
public interface FriendRepositoryCustom {
Page<Friend> findFriends(FriendCriteria friendCriteria, Pageable pageable);
}
And its implementation :
@...
153
votes
20
answers
231k
views
How to set the max size of upload file
I'm developing application based on Spring Boot and AngularJS using JHipster.
My question is how to set max size of uploading files?
If I'm trying to upload to big file I'm getting this information ...
24
votes
5
answers
36k
views
Multiple roles using @PreAuthorize
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 ...
55
votes
7
answers
59k
views
I am trying to set maxFileSize but it is not honored
I am developing an application utilizing JHipster. I have added the following to my application-dev.yml file:
spring:
profiles:
active: dev
multipart:
maxFileSize: -1
But I ...
52
votes
7
answers
67k
views
How to modify existing entity generated with jhipster?
I use jhipster generator to create a projet. I've generated some entity manually following the information provided in jhipster documentation :
If you prefer (or need) to do a database update ...
35
votes
3
answers
25k
views
How to add self signed SSL certificate to jHipster sample app?
I have create sample jHipster app. Now I want to add self signed SSL certificate and test in local to have a access to https. How to achieve this?
18
votes
2
answers
18k
views
Spring Security get user info in rest service, for authenticated and not authenticated users
I have a spring rest service, I want to use it for authenticated and not authenticated users. And I want to get user information from SecurityContextHolder.getContext().getAuthentication() if user is ...
10
votes
5
answers
16k
views
jhipster liquibase validation error after modify entity
I was trying to add an field to my entity as a CLOB. When using the JHipster CLI it was no problem to add it.
Now, when i trying to start my application i get the following validation error from ...
9
votes
1
answer
7k
views
jhipster oauth : How can i get the access_token via CURL
i'm trying to use the jhipster tool in order to create a new project with the oauth2 authentication. The project example work fine, i can login with the angularjs interface, but can't understand how ...
6
votes
1
answer
5k
views
JHipster: Registering a user with additional information
First of all, I'd like to thank "Paul Etienne" for his helpful question and answer! The answer bellow is a little bit more detailed and has been written considering the last version of JHipster (3/17/...
3
votes
2
answers
2k
views
Spring Boot with Embedded Undertow behind AWS ELB - HTTP to HTTPS redirect
I'm running a Spring boot (Jhipster/Undertow) application on port 8080 on an AWS EC2 instance.
I have an AWS ELB configured to redirect
80 -> 8080
443 (SSL termination happens here) -> 8080
...
1
vote
3
answers
16k
views
getting the current logged in user in JHipster
I am building a jhipster application. and I am trying to get a list of objects based on the current logged in user. there are a few simple examples online such as jhipster blog demo that describe how ...
13
votes
4
answers
7k
views
Steps to integrate PrimeNG with JHipster
We have been trying to incorporate PrimeNG components into a JHipster (angular 4) generated project with no success. After download and install PrimeNG into our project, we are able to import classes ...
8
votes
1
answer
2k
views
JHipster : Registering a user with additional information
I am developping an application using JHispter 3.12.2.
Since I needed more information than what JHipster provides, I created an entity UserExtra containing two Strings : a phone number and a skype ...
0
votes
1
answer
2k
views
jhipster refresh url cause "Cannot GET /user-management"
I create a jhipster app successfully, then login with admin/admin, click user-management, all works, the url changes to localhost:9000/user-management.
However, when I refresh url using chrome ...
175
votes
13
answers
220k
views
Error: ENOENT: no such file or directory, scandir
I scaffold an app using jhipster which is microservice gateway using cassandra db and using maven to build which was building fine after scaffold.i ran gulp command to for the live reload of ui.
i ...
55
votes
3
answers
121k
views
Spring Security - Authorize Request for certain URL & HTTP-Method using HttpSecurity
Is there any way to authorize a POST http-request to a specific URL using org.springframework.security.config.annotation.web.builders.HttpSecurity ?
I'm using HttpSecurity as:
@Override
...
35
votes
1
answer
18k
views
How to deploy microservices on Heroku
I have read a lot about microservices, and would like to build my app with that approach. What I know so far is that I nead some services like:
load balancer - to deal with every request, and push it ...
19
votes
1
answer
13k
views
JHipster configure maven wrapper proxy
According to https://jhipster.github.io/configuring-a-corporate-proxy/ I have set up my proxy settings in /.m2/settings.xml like this :
<proxies>
<proxy>
<id>myId</...
10
votes
4
answers
8k
views
spring-boot-devtools causing ClassCastException while getting from cache.
I am facing issue while getting value from cache.
java.lang.RuntimeException: java.lang.ClassCastException: com.mycom.admin.domain.User cannot be cast to com.mycom.admin.domain.User
Cache ...
8
votes
1
answer
2k
views
Preventing JHipster import-jdl from overwriting changes when updating entities
With my current workflow I have to check in git and manually read changes like added functions after every import-jdl that touches an entitiy I changed.
Is there a way to add functions to the classes ...
7
votes
6
answers
9k
views
Using ROLES in jhipster?
I tried to add and change roles in jhipster. First I just tried to change one use case's role to admin from user. Then I tested it and user can add employee even if the roles is ROLE_ADMIN so it didn'...
4
votes
2
answers
4k
views
Running JHipster Gradle task from Intellij IDEA
This error happens when I run with Gradle through from Intellij IDEA.. but from console everything works fine... someone knows why?
Executing external task 'run --stacktrace'... :compileJava UP-TO-...
4
votes
4
answers
7k
views
Reading of DBname.system.indexes failed on Atlas cluster by mongobee after getting connected
I have a Jhipster Spring boot project. Recently I shifted from mlabs standalone sandboxes to Atlas cluster sandbox M0 Free tier replica set. It even worked and I had made some database operations on ...
4
votes
2
answers
5k
views
Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long
Jhipster 5.7 microservice failed to start on windows with error CreateProcess error=206, The filename or extension is too long
I have created a Jhipster micro service. when I am trying to start, I ...
1
vote
2
answers
2k
views
JHipster 7.1.0: Failed to use jdl-import, throws Error looking for otherEntity User at
Im using java Openjdk 11.0.11, JHipster 7.1.0 and node v14.17.3
Im creating a simple microservice (one backend and one gateway) but JHipster fails to create using the jdl command (jdl-import), it ...
51
votes
5
answers
73k
views
Gradle build fails on Lombok annotated classes
I have a JHipster project in which I have added dependency for Lombok in build.gradle:
compile group: 'org.projectlombok', name: 'lombok', version: lombok_version
And I have the Lombok plugin ...
37
votes
5
answers
44k
views
Angular 7 : Injected service is undefined
I tried to inject AccountService in the LoginService but it won't ,the accountService is undefined but in the other hand the authServiceProvider is defined .
Contrarily it injected perfectly in ...
25
votes
5
answers
15k
views
In JHipster how to create entity with relationship with User?
I need to create my own entities using the JHipster using the command "yo jhipster:entity myEntity" that have many-to-one relationship with the User entity that comes by default in JHipster.
I have ...
22
votes
3
answers
49k
views
Add a body to a 404 Not Found Exception
In an REST API generated with JHipster, I want to throw some 404 exceptions. It is normally done with
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
which actualy results in a 404 response ...
22
votes
4
answers
18k
views
JHipster authentication using Postman and JWT
I'd been using the Postman in-tab extension to tests calls to call JHipster resource API's and found that it worked great (JHipster setup to use OAuth2). I authenticated using the JHipster login page,...
19
votes
2
answers
20k
views
The configured limit of 1.000 object references was reached while attempting to calculate the size of the object graph
I have a jhipster project and I added some entities.
My services are very slow because this warning message:
The configured limit of 1.000 object references was reached while attempting to ...
17
votes
5
answers
48k
views
How to set base url for Angular application
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 ...
17
votes
7
answers
14k
views
How to update the JHipster project after updating JHipster generator?
I updated my JHipster installation as per this page by running the command
npm update -g generator-jhipster
But to update my application I am not sure where should I run the next command yo ...
16
votes
5
answers
5k
views
Application generated with JHipster 4 returning blank page on 8080, but not on 9000
I've create an application with JHipster v4. When I make a request on port 8080 it is returning a blank page. If I use yarn start, and I make a request to 9000 port, it is answering correctly.
Any ...
13
votes
3
answers
10k
views
How to create unique constraint for 2 columns in JDL-Studio?
I have following entity configuration:
entity AirplaneModelSeat {
id Long,
seatNo String required
}
relationship ManyToOne {
AirplaneModelSeat{modelId(model)} to AirplaneModel
}
...
13
votes
2
answers
5k
views
Angular HTTP Error Empty Untyped Response
I have an Angular/JHipster application that makes HTTP calls. I want to do error handling in my Observable subscriptions.
However, when the first time the error handler is invoked, the err object is ...
10
votes
2
answers
9k
views
How to call JHipster (Spring) OAuth2 Rest server using Postman Authentication helpers
Postman has Authentication helpers to help with authenticated calls and I'm trying to use the OAuth 2.0 helper to call a REST server created by JHipster using Spring (Security, Social, etc).
I've ...
10
votes
1
answer
7k
views
Can not apply DaoAuthenticationConfigurer to already built object
I'm getting this exception:
[WARN] org.springframework.web.context.support.GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org....
9
votes
2
answers
8k
views
Spring Security multiple UserDetailsService
I have 3 different tables and every table has user-information. (Maybe the same username but different passwords)
Also, have 3 different URLs for authorization. Is it possible to use multiple ...
8
votes
2
answers
6k
views
How to make Spring Security accept JSON instead of form parameters?
I'm trying to change JHipster so it uses a JSON object for authentication instead of form parameters. I've managed to make this work for its JWT authentication mechanism. Now I'd like to do it for ...
7
votes
2
answers
4k
views
Can't build maven jhipster project with lombok
./mvnw and mvn clean install fail when adding lombok dependency but run successfully when launched from Intellij IDE
Find the error below :
INFO] ------------------------------------------------------...
6
votes
2
answers
5k
views
Jhipster 4 How to put entity component (list) on home screen
I'm using Jhipster 4 with Angular 2.0 to create application. I'm newbie for all this staff.
Let's say I have two entities: Customer and Task with relation one to many.
I would like to have list of ...
6
votes
2
answers
7k
views
Jhipster + REST client + authentication
I need to understand how to authenticate a REST client (could be Paw, could be an android app, an iOs app using AFNetworking with jHipster and I think, more in general, with spring-boot of which I am ...
6
votes
3
answers
13k
views
liquibase exception unknown data type "JSON"
my application use jhipster with mysql and liquibase, and mysql version is 5.7.20 which support json column, and I use ObjectMapper to map json column and java object, and it works, the column type is ...
5
votes
1
answer
2k
views
Missing User class - creating entity relationship to User entity in Microservice
I want to create an entity that has a Many to One relationship with JHipster's User entity.
I've used JDL-Studio to create the following entity and relationship to User which is imported into my ...
5
votes
4
answers
9k
views
Where and How To Define An Application Property? - JHIpster
In Spring Boot, an application property can be defined in application.properties file. For example, a prefix of Rest can be defined as
spring.data.rest.basePath=api
For JHipster which is based on ...
5
votes
1
answer
4k
views
Spingfox not recognizing custom serializer when generating JSON model for swagger
My jhipster v2.23.1 app uses custom serializers and deserializers for JSON parsing which I register as a module in JacksonConfiguration. The REST API works as expected using my custom mapping.
...
4
votes
1
answer
3k
views
Jhipster / md-button is not a known element
Hello I am using JHipster 4.0.1
I want integrate angular 2 material into my home.component.
I did :
npm install material
npm install angular2/{core,button}
<html><head&...
4
votes
2
answers
8k
views
SpringBoot app starts multiple times and disconnects from logstash
I have an springboot application (Spring Boot v1.3.5.RELEASE) that is run on docker with ./mvnw;
it "restarts" after 1-2 minutes and after second start they don't send any log to logstash..
in ...