Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot generate rate-limiting feature for gateway application #28461

Open
3 of 5 tasks
flyliu33 opened this issue Jan 13, 2025 · 0 comments · May be fixed by #28540
Open
3 of 5 tasks

cannot generate rate-limiting feature for gateway application #28461

flyliu33 opened this issue Jan 13, 2025 · 0 comments · May be fixed by #28540

Comments

@flyliu33
Copy link

flyliu33 commented Jan 13, 2025

Overview of the issue

Jhipster command generator-jhipster implicits if choosing Hazelcast as cache for microservice application, it should generate the rate-limiting for gateway applications also. However, it doesn't work while either generating by jdl command or by prompt.
image

Motivation for or Use Case

use rate-limiting feature to protect my system from attacks.

Reproduce the error
  1. download this file.jhipster-ms-ecommerce.txt
  2. change the postfix from txt to jdl
  3. execute command jhipster jdl .\jhipster-ms-ecommerce.jdl --auto-crlf
  4. check code.
Related issues
Suggest a Fix
JHipster Version(s)

v8.7.3

<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "applicationIndex": 2,
    "applicationType": "microservice",
    "authenticationType": "jwt",
    "autoCrlf": true,
    "baseName": "invoice",
    "buildTool": "maven",
    "cacheProvider": "hazelcast",
    "databaseType": "sql",
    "devDatabaseType": "mysql",
    "enableHibernateCache": true,
    "enableSwaggerCodegen": true,
    "enableTranslation": false,
    "entities": [
      "Invoice",
      "Shipment"
    ],
    "gatewayServerPort": "8080",
    "jhiPrefix": "union",
    "jhipsterVersion": "8.7.3",
    "lastLiquibaseTimestamp": 1736758850000,
    "messageBroker": "kafka",
    "monorepository": true,
    "nativeLanguage": "zh-cn",
    "packageName": "com.jhipster.demo.invoice",
    "prodDatabaseType": "mysql",
    "searchEngine": "elasticsearch",
    "serverPort": "8082",
    "serviceDiscoveryType": "consul",
    "skipClient": true,
    "skipCommitHook": true,
    "skipUserManagement": true,
    "websocket": false
  }
}
</pre>
</details>


##### **Environment and Tools**

openjdk version "17.0.12" 2024-07-16 LTS
OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)

git version 2.45.1.windows.1

node: v20.18.0
npm: 10.8.2

Docker version 27.1.1, build 6312585

##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>
/**
 * 发票
 */
@ChangelogDate("20250113090950")
entity Invoice {
  id Long
  /**
   * 发票号码
   */
  code String required
  /**
   * 发票日期
   */
  date Instant required
  /**
   * 发票详情
   */
  details String
  /**
   * 发票状态
   */
  status InvoiceStatus required
  /**
   * 付款方式
   */
  paymentMethod PaymentMethod required
  /**
   * 付款日期
   */
  paymentDate Instant required
  /**
   * 付款金额
   */
  paymentAmount BigDecimal required
}
@ChangelogDate("20250113091050")
entity Shipment {
  id Long
  trackingCode String
  date Instant required
  details String
}

enum InvoiceStatus {
  PAID,
  ISSUED,
  CANCELLED
}
enum PaymentMethod {
  CREDIT_CARD,
  CASH_ON_DELIVERY,
  PAYPAL
}

relationship OneToMany {
  Invoice{shipment} to Shipment{invoice(code) required}
}

dto Invoice, Shipment with mapstruct
paginate Invoice, Shipment with pagination
service Invoice, Shipment with serviceClass
search Invoice, Shipment with elasticsearch
microservice Invoice, Shipment with invoice
clientRootFolder Invoice, Shipment with invoice

</pre>
</details>
Browsers and Operating System

Edition Windows 11 Pro
Version 24H2
Installed on ‎11/‎22/‎2024
OS build 26100.2605
Experience Windows Feature Experience Pack 1000.26100.36.0

  • Tickets opened without reproduction steps or that doesn't follows the template recommendation will be closed.
  • This issue is prompt-related or an error that prevents JHipster from generating an application.
  • I don't have a JDL otherwise I should open an JDL Issue
  • The application is not successfully generated otherwise, I should open an Issue with jhipster info
  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant