From acbb90ced12563fd13070547c3c58849ed6e9b25 Mon Sep 17 00:00:00 2001 From: "zhehen.lu" Date: Tue, 17 Mar 2026 11:15:40 +0800 Subject: [PATCH 1/2] [docs]doc: fix typos in blog, pt-BR alert doc and AI prompt Made-with: Cursor --- hertzbeat-ai/src/main/resources/prompt/system-message.st | 2 +- home/blog/2024-07-27-new-committer.md | 4 ++-- .../src/assets/doc/alert-integration/alertmanager.pt-BR.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hertzbeat-ai/src/main/resources/prompt/system-message.st b/hertzbeat-ai/src/main/resources/prompt/system-message.st index 68463361e06..782e1aa042f 100644 --- a/hertzbeat-ai/src/main/resources/prompt/system-message.st +++ b/hertzbeat-ai/src/main/resources/prompt/system-message.st @@ -196,7 +196,7 @@ CRITICAL WORKFLOW Do all of this iteratively with user interaction at each step: - Provide clear explanations of monitoring data and actionable insights ## Avoid these common errors: -- Using Label name instead of the value from the heirarchy JSON while creating alert rules. +- Using Label name instead of the value from the hierarchy JSON while creating alert rules. - Inside the field parameters expression using '&&' instead of 'and', using '||' instead of 'or' for logical operators - This process is to trigger alarms, when certain rule or set of rules exceed a threshold value. So when a user says that the threshold should be less than 1000. the operator used should be '>' not '<', diff --git a/home/blog/2024-07-27-new-committer.md b/home/blog/2024-07-27-new-committer.md index d7ea74ccb97..688b2a5dbd4 100644 --- a/home/blog/2024-07-27-new-committer.md +++ b/home/blog/2024-07-27-new-committer.md @@ -17,11 +17,11 @@ I have been working as a Java back-end developer for three years. At present, I ## First met Apache Hertzbeat -Reading code and design in open-source framework is one way for me to improve myself. One day a thought came to my mind, which is to contribute to open-source community. Then I met Hertzbeat in an article on the internel, which is completely different from Prometheus and Skywalking that I had known before. Hertzbeat fascinate me with its feature, agentless and anyone can custom monitoring by monifying yaml. I forked Hertzbeat on GitHub and tried to run it locally for further study. +Reading code and design in open-source framework is one way for me to improve myself. One day a thought came to my mind, which is to contribute to open-source community. Then I met Hertzbeat in an article on the internet, which is completely different from Prometheus and Skywalking that I had known before. Hertzbeat fascinated me with its feature, agentless and anyone can custom monitoring by modifying yaml. I forked Hertzbeat on GitHub and tried to run it locally for further study. ## My first PR -I failed to start Hertzbeat when I followed instructions in CONTRIBUTING. The exception shows that Node.js version at lease 18 is required. Therefor I modified CONTRIBUTING and opened my first PR in Hertzbeat community. +I failed to start Hertzbeat when I followed instructions in CONTRIBUTING. The exception shows that Node.js version at least 18 is required. Therefore I modified CONTRIBUTING and opened my first PR in Hertzbeat community. ## Keep active in community diff --git a/web-app/src/assets/doc/alert-integration/alertmanager.pt-BR.md b/web-app/src/assets/doc/alert-integration/alertmanager.pt-BR.md index 77634788d20..13fd89a3d98 100644 --- a/web-app/src/assets/doc/alert-integration/alertmanager.pt-BR.md +++ b/web-app/src/assets/doc/alert-integration/alertmanager.pt-BR.md @@ -1,4 +1,4 @@ -> Envie alarmes do Prometheus AlertManager para a plataforma de alarme HertzBeat。 +> Envie alarmes do Prometheus AlertManager para a plataforma de alarme HertzBeat. ### Webhook de configuração do Alertmanager From a43b6645b26cb09c01437288f4b7f4dc13e817f4 Mon Sep 17 00:00:00 2001 From: "zhehen.lu" Date: Tue, 17 Mar 2026 11:15:47 +0800 Subject: [PATCH 2/2] [docs]doc: fix grammar and wording consistency in docs and AccountController Made-with: Cursor --- home/docs/start/docker-deploy.md | 2 +- home/docs/start/mysql-change.md | 2 +- home/docs/start/postgresql-change.md | 4 ++-- home/docs/start/victoria-metrics-init.md | 2 +- home/versioned_docs/version-1.6.x/start/docker-deploy.md | 2 +- home/versioned_docs/version-1.6.x/start/mysql-change.md | 2 +- .../version-1.6.x/start/postgresql-change.md | 4 ++-- .../version-1.6.x/start/victoria-metrics-init.md | 2 +- home/versioned_docs/version-1.7.x/start/docker-deploy.md | 2 +- home/versioned_docs/version-1.7.x/start/mysql-change.md | 2 +- .../version-1.7.x/start/postgresql-change.md | 4 ++-- .../version-1.7.x/start/victoria-metrics-init.md | 2 +- home/versioned_docs/version-1.8.0/introduce.md | 2 +- home/versioned_docs/version-1.8.0/start/docker-deploy.md | 2 +- home/versioned_docs/version-1.8.0/start/mysql-change.md | 2 +- .../version-1.8.0/start/postgresql-change.md | 4 ++-- .../version-1.8.0/start/victoria-metrics-init.md | 2 +- .../templatehub/controller/AccountController.java | 8 ++++---- 18 files changed, 25 insertions(+), 25 deletions(-) diff --git a/home/docs/start/docker-deploy.md b/home/docs/start/docker-deploy.md index 69c2310c023..7d80a001ed3 100644 --- a/home/docs/start/docker-deploy.md +++ b/home/docs/start/docker-deploy.md @@ -31,7 +31,7 @@ It is necessary to have Docker environment in your environment. If not installed - `docker run -d` : Run a container in the background via Docker - `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. - - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. + - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due to creating or deleting container. - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) diff --git a/home/docs/start/mysql-change.md b/home/docs/start/mysql-change.md index b6d91c01806..6a470d7aac1 100644 --- a/home/docs/start/mysql-change.md +++ b/home/docs/start/mysql-change.md @@ -4,7 +4,7 @@ title: Use MYSQL Replace H2 Database to Store Metadata(Optional) sidebar_label: Meta Store MYSQL --- -MYSQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allow you to use MYSQL to store structured relational data such as monitoring information, alarm information and configuration information. +MySQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use MySQL to store structured relational data such as monitoring information, alarm information and configuration information. > If you already have a MySQL environment and the MySQL version meets the requirements, you can skip directly to the database creation step. diff --git a/home/docs/start/postgresql-change.md b/home/docs/start/postgresql-change.md index f1c98e74569..d1bb57964eb 100644 --- a/home/docs/start/postgresql-change.md +++ b/home/docs/start/postgresql-change.md @@ -4,9 +4,9 @@ title: Use PostgreSQL Replace H2 Database to Store Metadata(Recommended) sidebar_label: Meta Store PostgreSQL (Recommended) --- -PostgreSQL is a RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allow you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. +PostgreSQL is an RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. -> If you have the PostgreSQL environment, can be directly to database creation step. +> If you have a PostgreSQL environment, you can skip directly to the database creation step. ### Install PostgreSQL via Docker diff --git a/home/docs/start/victoria-metrics-init.md b/home/docs/start/victoria-metrics-init.md index 0ec9ba1c697..5900a5da741 100644 --- a/home/docs/start/victoria-metrics-init.md +++ b/home/docs/start/victoria-metrics-init.md @@ -13,7 +13,7 @@ VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and t **Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** **⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** -> If you already have an VictoriaMetrics environment, you can skip directly to the YML configuration step. +> If you already have a VictoriaMetrics environment, you can skip directly to the YML configuration step. ### Install VictoriaMetrics via Docker diff --git a/home/versioned_docs/version-1.6.x/start/docker-deploy.md b/home/versioned_docs/version-1.6.x/start/docker-deploy.md index 69c2310c023..7d80a001ed3 100644 --- a/home/versioned_docs/version-1.6.x/start/docker-deploy.md +++ b/home/versioned_docs/version-1.6.x/start/docker-deploy.md @@ -31,7 +31,7 @@ It is necessary to have Docker environment in your environment. If not installed - `docker run -d` : Run a container in the background via Docker - `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. - - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. + - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due to creating or deleting container. - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) diff --git a/home/versioned_docs/version-1.6.x/start/mysql-change.md b/home/versioned_docs/version-1.6.x/start/mysql-change.md index 139feda7888..46cbc256910 100644 --- a/home/versioned_docs/version-1.6.x/start/mysql-change.md +++ b/home/versioned_docs/version-1.6.x/start/mysql-change.md @@ -4,7 +4,7 @@ title: Use MYSQL Replace H2 Database to Store Metadata(Optional) sidebar_label: Meta Store MYSQL --- -MYSQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat allow you to use MYSQL to store structured relational data such as monitoring information, alarm information and configuration information. +MySQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat allows you to use MySQL to store structured relational data such as monitoring information, alarm information and configuration information. > If you already have a MySQL environment and the MySQL version meets the requirements, you can skip directly to the database creation step. diff --git a/home/versioned_docs/version-1.6.x/start/postgresql-change.md b/home/versioned_docs/version-1.6.x/start/postgresql-change.md index e2bdadd392b..007594334f1 100644 --- a/home/versioned_docs/version-1.6.x/start/postgresql-change.md +++ b/home/versioned_docs/version-1.6.x/start/postgresql-change.md @@ -4,9 +4,9 @@ title: Use PostgreSQL Replace H2 Database to Store Metadata(Recommended) sidebar_label: Meta Store PostgreSQL (Recommended) --- -PostgreSQL is a RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat allow you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. +PostgreSQL is an RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat allows you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. -> If you have the PostgreSQL environment, can be directly to database creation step. +> If you have a PostgreSQL environment, you can skip directly to the database creation step. ### Install PostgreSQL via Docker diff --git a/home/versioned_docs/version-1.6.x/start/victoria-metrics-init.md b/home/versioned_docs/version-1.6.x/start/victoria-metrics-init.md index 698202f3c4f..78e47659218 100644 --- a/home/versioned_docs/version-1.6.x/start/victoria-metrics-init.md +++ b/home/versioned_docs/version-1.6.x/start/victoria-metrics-init.md @@ -13,7 +13,7 @@ VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and t **Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** **⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** -> If you already have an VictoriaMetrics environment, you can skip directly to the YML configuration step. +> If you already have a VictoriaMetrics environment, you can skip directly to the YML configuration step. ### Install VictoriaMetrics via Docker diff --git a/home/versioned_docs/version-1.7.x/start/docker-deploy.md b/home/versioned_docs/version-1.7.x/start/docker-deploy.md index 69c2310c023..7d80a001ed3 100644 --- a/home/versioned_docs/version-1.7.x/start/docker-deploy.md +++ b/home/versioned_docs/version-1.7.x/start/docker-deploy.md @@ -31,7 +31,7 @@ It is necessary to have Docker environment in your environment. If not installed - `docker run -d` : Run a container in the background via Docker - `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. - - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. + - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due to creating or deleting container. - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) diff --git a/home/versioned_docs/version-1.7.x/start/mysql-change.md b/home/versioned_docs/version-1.7.x/start/mysql-change.md index b817caca8a4..caf85789b4a 100644 --- a/home/versioned_docs/version-1.7.x/start/mysql-change.md +++ b/home/versioned_docs/version-1.7.x/start/mysql-change.md @@ -4,7 +4,7 @@ title: Use MYSQL Replace H2 Database to Store Metadata(Optional) sidebar_label: Meta Store MYSQL --- -MYSQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allow you to use MYSQL to store structured relational data such as monitoring information, alarm information and configuration information. +MySQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use MySQL to store structured relational data such as monitoring information, alarm information and configuration information. > If you already have a MySQL environment and the MySQL version meets the requirements, you can skip directly to the database creation step. diff --git a/home/versioned_docs/version-1.7.x/start/postgresql-change.md b/home/versioned_docs/version-1.7.x/start/postgresql-change.md index 4b25fbf3502..4b0fbe8ba22 100644 --- a/home/versioned_docs/version-1.7.x/start/postgresql-change.md +++ b/home/versioned_docs/version-1.7.x/start/postgresql-change.md @@ -4,9 +4,9 @@ title: Use PostgreSQL Replace H2 Database to Store Metadata(Recommended) sidebar_label: Meta Store PostgreSQL (Recommended) --- -PostgreSQL is a RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allow you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. +PostgreSQL is an RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. -> If you have the PostgreSQL environment, can be directly to database creation step. +> If you have a PostgreSQL environment, you can skip directly to the database creation step. ### Install PostgreSQL via Docker diff --git a/home/versioned_docs/version-1.7.x/start/victoria-metrics-init.md b/home/versioned_docs/version-1.7.x/start/victoria-metrics-init.md index 0ec9ba1c697..5900a5da741 100644 --- a/home/versioned_docs/version-1.7.x/start/victoria-metrics-init.md +++ b/home/versioned_docs/version-1.7.x/start/victoria-metrics-init.md @@ -13,7 +13,7 @@ VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and t **Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** **⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** -> If you already have an VictoriaMetrics environment, you can skip directly to the YML configuration step. +> If you already have a VictoriaMetrics environment, you can skip directly to the YML configuration step. ### Install VictoriaMetrics via Docker diff --git a/home/versioned_docs/version-1.8.0/introduce.md b/home/versioned_docs/version-1.8.0/introduce.md index fdba2db0c45..a4a9c4eb91c 100644 --- a/home/versioned_docs/version-1.8.0/introduce.md +++ b/home/versioned_docs/version-1.8.0/introduce.md @@ -240,7 +240,7 @@ Built-in support for monitoring types include: ### Alarm Threshold -- Alarm Threshold are the core function of `HertzBeat`, users can configure the trigger conditions of the alarm through the threshold rules. +- Alarm Thresholds are the core function of `HertzBeat`, users can configure the trigger conditions of the alarm through the threshold rules. - Support real-time threshold and scheduled threshold, real-time threshold can directly trigger the alarm when monitoring data is collected, scheduled threshold supports PromQL and other expressions to calculate the trigger alarm within a specified time period. - Support visual page configuration or more flexible expression rule configuration, support configuring trigger times, alarm levels, notification templates, associated specified monitoring and so on. diff --git a/home/versioned_docs/version-1.8.0/start/docker-deploy.md b/home/versioned_docs/version-1.8.0/start/docker-deploy.md index 69c2310c023..7d80a001ed3 100644 --- a/home/versioned_docs/version-1.8.0/start/docker-deploy.md +++ b/home/versioned_docs/version-1.8.0/start/docker-deploy.md @@ -31,7 +31,7 @@ It is necessary to have Docker environment in your environment. If not installed - `docker run -d` : Run a container in the background via Docker - `-p 1157:1157 -p 1158:1158` : Mapping container ports to the host, 1157 is web-ui port, 1158 is cluster port. - - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due creating or deleting container. + - `-v $(pwd)/data:/opt/hertzbeat/data` : (optional, data persistence) Important, Mount the H2 database file to the local host, to ensure that the data is not lost due to creating or deleting container. - `-v $(pwd)/logs:/opt/hertzbeat/logs` : (optional) Mount the log file to the local host to facilitate viewing. - `-v $(pwd)/application.yml:/opt/hertzbeat/config/application.yml` : (optional) Mount the configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/application.yml) - `-v $(pwd)/sureness.yml:/opt/hertzbeat/config/sureness.yml` : (optional) Mount the account configuration file to the container (please ensure that the file exists locally). [Download](https://github.com/apache/hertzbeat/raw/master/script/sureness.yml) diff --git a/home/versioned_docs/version-1.8.0/start/mysql-change.md b/home/versioned_docs/version-1.8.0/start/mysql-change.md index b817caca8a4..caf85789b4a 100644 --- a/home/versioned_docs/version-1.8.0/start/mysql-change.md +++ b/home/versioned_docs/version-1.8.0/start/mysql-change.md @@ -4,7 +4,7 @@ title: Use MYSQL Replace H2 Database to Store Metadata(Optional) sidebar_label: Meta Store MYSQL --- -MYSQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allow you to use MYSQL to store structured relational data such as monitoring information, alarm information and configuration information. +MySQL is a reliable relational database. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use MySQL to store structured relational data such as monitoring information, alarm information and configuration information. > If you already have a MySQL environment and the MySQL version meets the requirements, you can skip directly to the database creation step. diff --git a/home/versioned_docs/version-1.8.0/start/postgresql-change.md b/home/versioned_docs/version-1.8.0/start/postgresql-change.md index 4b25fbf3502..4b0fbe8ba22 100644 --- a/home/versioned_docs/version-1.8.0/start/postgresql-change.md +++ b/home/versioned_docs/version-1.8.0/start/postgresql-change.md @@ -4,9 +4,9 @@ title: Use PostgreSQL Replace H2 Database to Store Metadata(Recommended) sidebar_label: Meta Store PostgreSQL (Recommended) --- -PostgreSQL is a RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allow you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. +PostgreSQL is an RDBMS emphasizing extensibility and SQL compliance. In addition to default built-in H2 database, Apache HertzBeat™ allows you to use PostgreSQL to store structured relational data such as monitoring information, alarm information and configuration information. -> If you have the PostgreSQL environment, can be directly to database creation step. +> If you have a PostgreSQL environment, you can skip directly to the database creation step. ### Install PostgreSQL via Docker diff --git a/home/versioned_docs/version-1.8.0/start/victoria-metrics-init.md b/home/versioned_docs/version-1.8.0/start/victoria-metrics-init.md index 0ec9ba1c697..5900a5da741 100644 --- a/home/versioned_docs/version-1.8.0/start/victoria-metrics-init.md +++ b/home/versioned_docs/version-1.8.0/start/victoria-metrics-init.md @@ -13,7 +13,7 @@ VictoriaMetrics is a fast, cost-effective and scalable monitoring solution and t **Note⚠️ Time series database is optional, but production environment configuration is strongly recommended to provide more complete historical chart functions and high performance** **⚠️ If you do not configure a time series database, only the last hour of historical data is retained.** -> If you already have an VictoriaMetrics environment, you can skip directly to the YML configuration step. +> If you already have a VictoriaMetrics environment, you can skip directly to the YML configuration step. ### Install VictoriaMetrics via Docker diff --git a/template-marketplace/hertzbeat-template-hub/src/main/java/org/apache/hertzbeat/templatehub/controller/AccountController.java b/template-marketplace/hertzbeat-template-hub/src/main/java/org/apache/hertzbeat/templatehub/controller/AccountController.java index 40dad09a341..19ae81c2252 100644 --- a/template-marketplace/hertzbeat-template-hub/src/main/java/org/apache/hertzbeat/templatehub/controller/AccountController.java +++ b/template-marketplace/hertzbeat-template-hub/src/main/java/org/apache/hertzbeat/templatehub/controller/AccountController.java @@ -119,16 +119,16 @@ public ResponseEntity> accountRegister(@RequestBody @Validated S if (accountService.registerAccount(account)) { Long authUser = roleService.getRoleIdByCode("role_user"); - if(authUser == null) throw new HertzbeatTemplateHubException("Role query error"); + if (authUser == null) throw new HertzbeatTemplateHubException("Role query error"); boolean b = accountService.authorityUserRole(account.getEmail(), authUser); - if(!b) throw new HertzbeatTemplateHubException("Role authority error"); - Message message=Message.success("Sign up success, login after"); + if (!b) throw new HertzbeatTemplateHubException("Role authority error"); + Message message = Message.success("Sign up success, login after"); if (log.isDebugEnabled()) { log.debug("account: {}, sign up success", account); } return ResponseEntity.ok(message); } else { - return ResponseEntity.ok(Message.fail(FAIL_CODE,"Email already exist")); + return ResponseEntity.ok(Message.fail(FAIL_CODE, "Email already exists")); } } }