jhipster

has-any-authorithy directive in jhipster application

别说谁变了你拦得住时间么 提交于 2019-12-21 23:02:13
问题 I have created a new role ROLE_SUPERUSER in my jhipster application. I want a specific navbar menu to be visible to only admin and my new user. I tried using has-any-authorithy as given in authority.directive.js but its not working. I am using it in HTML like has-any-authorithy="['ROLE_ADMIN','ROLE_SUPERUSER']" Am I missing anything? 回答1: Code says: authorities = attrs.hasAnyAuthority.replace(/\s+/g, '').split(','); So it seems that the directive expects one string and not an array. Try this:

What is the correct Eclipse setup for JHipster?

百般思念 提交于 2019-12-21 20:53:53
问题 I am getting this error from the first attempt to get a jhipster project compiled in STS Eclipse. The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirectly referenced from required .class files CustomPersistentRememberMeServices.java /us-modeldrivers-jhipsterTest003/src/main/java/us/modeldrivers/jhipsterTest003/security line 1 Java Problem My process so far : Install jhipster and run a project build Create a Spring project in STS Eclipse Update the pom to

Auto generate JHipster entities from existing database

时光总嘲笑我的痴心妄想 提交于 2019-12-21 19:56:12
问题 As part of JHispster 2.11.0, the entity configuration is saved in a specific .json file, in the .jhipster directory. These files can be used to regenerate entities and related files in JHipster application using the below command. yo jhipster:entity ENTITY_NAME Is there any way to auto generate those .json files from existing database? 回答1: We are currently working to generate those files from a UML model, see our JHipster UML project. So if you can export your database schema to UML, this

How to use JHipster and Hibernate Envers

我与影子孤独终老i 提交于 2019-12-21 06:09:30
问题 I am having trouble figuring out how to use Hibernate Envers and JHipster. I am using PostgreSQL to store the data, and latest Jhipster 2.6.0 I just generated a JHipster application, with no modifications at all. The User domain class extends the AbstractAuditingEntity class, which has the @Audited annotation, but when editing a user there's no t_user_aud table created in the database. Is there any configuration needed in order to have Hibernate Envers saving modifications ? 回答1: I've got a

How to create unique constraint for 2 columns in JDL-Studio?

北城余情 提交于 2019-12-21 05:15:22
问题 I have following entity configuration: entity AirplaneModelSeat { id Long, seatNo String required } relationship ManyToOne { AirplaneModelSeat{modelId(model)} to AirplaneModel } This entity configuration creates such a table: +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | seat_no | varchar(255) |

JHipster JDL not generating anything because the database type must be passed

夙愿已清 提交于 2019-12-20 05:43:13
问题 I'm using Jhipster 4.5.3 to generate some code from a JDL file I've created. Because I couldn't generate anything, I took the JDL Blog sample... and I have the same issues. The JDL documentation still mentions : You can generate entities from a JDL file by running jhipster import-jdl your-jdl-file.jh But when I do that I get : The jdl is being parsed. { name: 'NullPointerException', message: 'The parsed JDL content and the database type must be passed.', Looking at the code, it looks like we

Remove items from array of documents in Spring+Mongo

妖精的绣舞 提交于 2019-12-20 04:13:29
问题 I have a collection of documents like this in a mongo db : "_id" : ObjectId("592bc37c339e7a23788b4c7c"), "trips" : [ { "tripGcsId" : "5937f86e339e7a2a58ac3186", "tripCounter" : NumberLong(1283), "tripRef" : "hjkhjk" }, { "tripGcsId" : "5937f914339e7a2a58ac318b", "tripCounter" : NumberLong(1284), "tripRef" : "fjh" } ] and a method on the server side (Spring+Mongo): public List<String> removeTripObject( List<String> tripIds ) { Query query = Query.query( Criteria.where( "trips" ).elemMatch(

Reading of DBname.system.indexes failed on Atlas cluster by mongobee after getting connected

匆匆过客 提交于 2019-12-20 03:32:40
问题 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 it. But now for some reason then there is a read permission error Error creating bean with name 'mongobee' defined in class path resource [DatabaseConfiguration.class]: Invocation of init method failed; nested exception is com.mongodb.MongoQueryException: Query failed with error code 8000 and

Can not apply DaoAuthenticationConfigurer to already built object

六眼飞鱼酱① 提交于 2019-12-19 05:48:16
问题 I'm getting this exception: [WARN] org.springframework.web.context.support.GenericWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountResource': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private io.ilopezluna.japanathome.service.UserService io

spring-boot-devtools causing ClassCastException while getting from cache.

為{幸葍}努か 提交于 2019-12-18 13:25:10
问题 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 Configuration @Configuration @EnableCaching @AutoConfigureAfter(value = { MetricsConfiguration.class, DatabaseConfiguration.class }) @Profile("!" + Constants.SPRING_PROFILE_FAST) public class MemcachedCacheConfiguration extends CachingConfigurerSupport { private final Logger log = LoggerFactory.getLogger