天道酬勤,学无止境

jhipster

Can't build maven jhipster project with lombok

问题 ./mvnw 和 mvn clean install 在添加 lombok 依赖项时失败,但从 Intellij IDE 启动时成功运行 查找以下错误: INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] src/main/java/web/rest/core/service/impl/ProductServiceImpl.java:[18,29] cannot find symbol symbol: method builder() location: class com.test.one.web.rest.core.model.Product 这是 POJO import lombok.Builder; import lombok.Data; @Data @Builder public class Product { private String name; } 回答1 Jhipster 生成的 maven 项目在 maven 编译插件中使用了

2022-05-17 04:50:43    分类:技术分享    maven   jhipster   lombok

SQLServerException: The index 1 is out of range when executiong Spring Data findAll(Pageable)

问题 当调用实体的 Spring Data findAll(Pageable) 方法时,Hibernate 会执行以下查询: select TOP(?) customer0_.id as id1_0_, customer0_.name as name2_0_ from customer customer0_ 之后执行以下查询: Hibernate: select customer0_.id as id1_0_, customer0_.name as name2_0_ from customer customer0_ order by customer0_.id asc offset 0 rows fetch next 20 rows only 引发了一个异常 o.h.engine.jdbc.spi.SqlExceptionHelper : could not execute query [select customer0_.id as id1_0_, customer0_.name as name2_0_ from customer customer0_ order by customer0_.id asc] com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range. at com

2022-05-16 09:41:32    分类:技术分享    sql-server   hibernate   jhipster

How to add custom js and css files in jHipster 4

问题 回答1 在运行yarn start时编辑src/main/webapp/content/css/global.css文件:您的更改应该是热重新加载的。 如果您有多个 CSS ,请使用@import或将它们导入vendor.ts 。 对于您的自定义 js 文件也是如此,这些文件应该位于src/main/webapp/app下,但可能是用 Typescript 而不是 javascript 编写的。 当然,我假设您对 Angular 有一定的了解。 回答2 我们在实现primeng时了解到将其添加到src/main/webapp/content/scss/vendor.scss例如: @import '~primeng/resources/primeng.min.css'; @import '~primeng/resources/themes/bootstrap/theme.css'; 我们在创建 jhipster 应用程序时添加了scss选项

2022-05-16 01:43:03    分类:技术分享    webpack   jhipster

Jhipster - 404 error on app.js when running in prod profile

问题 我在 prod 中运行我的 jhipster 应用程序时遇到问题。 部署 prod war 文件后,由于在 /app/app.js 上找不到 404,站点无法加载但是供应商 js 和 css 已正确注入。 不知道是什么导致了这个问题。 错误信息 : 加载资源失败:服务器响应状态为 404(未找到) 生成的.js:19530 未捕获的类型错误:无法读取未定义的属性“模块”(…) http://localhost:9080/app/app.js 加载资源失败:服务器响应状态为 404(未找到) 在浏览器控制台中看到的错误: 回答1 您是否还为产品构建了您的应用程序? 看起来您的应用没有构建客户端站点。 这实际上是通过 gulp build 命令完成的。 根据您的构建系统 maven 或 gradle,您可以为构建阶段指定 prod 环境,例如 maven mvn -Pprod package 。 gulp build命令将在构建阶段自动执行。 在文档中,您可以找到有关如何在生产中使用 JHipster 的更多信息。

2022-05-15 12:24:04    分类:技术分享    javascript   gulp   jhipster

Asynchronous REST API generating warning

I am working with a Spring boot application. I have a rest controller that returns Callable. @GetMapping("/fb-roles") @Timed public Callable<List<FbRole>> getAllFbRoles() { log.debug("REST request to get all FbRoles"); return (() -> { return fbRoleRepository.findAll(); }); } A ThreadPoolTaskExecutor is configures as follow: @Configuration @EnableAsync @EnableScheduling public class AsyncConfiguration implements AsyncConfigurer { private final Logger log = LoggerFactory.getLogger(AsyncConfiguration.class); private final JHipsterProperties jHipsterProperties; public AsyncConfiguration

2022-05-03 08:16:49    分类:问答    spring   spring-mvc   spring-boot   jhipster   spring-async

JHipster 7.1.0: Failed to generate gateway, Provider reactor.blockhound.junit.platform.BlockHoundTestExecutionListener could not be instantiated

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 throws Error: Error looking for otherEntity User at Tag,Product,Blog,Post at /Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/generators/entity/index.js:560:19 at Array.forEach (<anonymous>) at EntityGenerator.loadRelationships (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/generators/entity/index.js:556:36) at Object.<anonymous> (/Users

2022-05-03 00:35:47    分类:问答    jhipster

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 throws Error: Error looking for otherEntity User at Tag,Product,Blog,Post at /Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/generators/entity/index.js:560:19 at Array.forEach (<anonymous>) at EntityGenerator.loadRelationships (/Users/carestra/.nvm/versions/node/v14.17.3/lib/node_modules/generator-jhipster/generators/entity/index.js:556:36) at Object.<anonymous> (/Users

2022-05-02 18:04:52    分类:问答    microservices   jhipster

JHipster/Angular: Alternative for pureFilter pipe which was removed (in JHipster 7.0.0.-beta.0)

I am still learning JHipster by the "Full Stack Development with JHipster (Second Edition)" book which uses JHipster 6.5.0. In Chapter 5 "Customization and Further Development" a filter functionality should be added (page 135). The authors use a pipe provided by JHipster to filter the list using the name field of the product. *ngFor="let product of (products | pureFilter:filter:'name'); trackBy: trackId"> With JHipster 7.0.0. I get an error telling me that "pureFilter" is an unknown pipe. I researched and found that the pureFilter pipe seemed to be defined in ng-jhipster/pipe/pure-filter.pipe

2022-05-02 16:58:44    分类:问答    angular   jhipster

JHipster/Angular - How to deal with removal of transition() in generator/../entity-management.component.ts.ejs (in JHipster 6.6.0)

I am starting to learn JHipster with the "Full Stack Development with JHipster (Second Edition)" book which uses JHipster 6.5.0. In Chapter 5 "Customization and Further Development" the default table view is replaced by a list. In order to bring back the sorting functionality, the authors include the following jhiSort directive (page 134): jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)" as part of this code snippet: <div class="mb-2 d-flex justify-content-end align-items-center"> <span class="mx-2 col-1">Sort by</span> <div class="btn-group" role=

2022-05-02 15:07:32    分类:问答    angular   jhipster

Why do I need mapstruct for when using Jhipster?

When I read mapstruct documentation they say: MapStruct is a Java annotation processor for the generation of type-safe bean mapping classes. https://mapstruct.org/documentation/stable/reference/html/#introduction Which leaves me with the queston. Why do I need mapstruct? Jhipster uses it and I have no clue why did they need it for in the first place? Why you need a mapping inside Jhipster. They also mention that .... Compared to writing mapping code from hand, MapStruct saves time by generating code which is tedious and error-prone to write. So it saves time but it does not explain why you

2022-05-01 10:13:38    分类:问答    jhipster   mapstruct