Optimize translation in starter.

This commit is contained in:
jiangjining 2021-01-07 10:09:29 +08:00
parent d69171afa5
commit d4a7aa68b1
4 changed files with 9 additions and 10 deletions

View File

@ -33,7 +33,7 @@ public class PowerJobAutoConfiguration {
PowerJobProperties.Worker worker = properties.getWorker();
/*
* Address(es) of PowerJob-server node(s). Do not mistake for ActorSystem port. Do not add
* Address of PowerJob-server node(s). Do not mistake for ActorSystem port. Do not add
* any prefix, i.e. http://.
*/
CommonUtils.requireNonNull(worker.getServerAddress(), "serverAddress can't be empty!");
@ -44,8 +44,8 @@ public class PowerJobAutoConfiguration {
*/
OhMyConfig config = new OhMyConfig();
/*
* Configuration of worker port. Random port is enabled when port is set with non-positive number.
*/
* Configuration of worker port. Random port is enabled when port is set with non-positive number.
*/
int port = worker.getAkkaPort();
if (port <= 0) {
port = NetUtils.getRandomPort();
@ -53,8 +53,8 @@ public class PowerJobAutoConfiguration {
config.setPort(port);
/*
* appName, name of the application. Applications should be registered in advance to prevent
* reporting error. This property should be the same with what you entered for appName when
* getting registered.
* error. This property should be the same with what you entered for appName when getting
* registered.
*/
config.setAppName(worker.getAppName());
config.setServerAddress(serverAddress);

View File

@ -22,7 +22,7 @@
{
"name": "powerjob.worker.app-name",
"type": "java.lang.String",
"description": "name of application. Register in PowerJob-console to prevent error.",
"description": "Name of application. Register in PowerJob-console to prevent error.",
"sourceType": "com.github.kfcfans.powerjob.worker.autoconfigure.PowerJobProperties$Worker"
},
{
@ -42,7 +42,7 @@
{
"name": "powerjob.worker.server-address",
"type": "java.lang.String",
"description": "PowerJob-server node address(es), ip:port or domain, multiple addresses should be separated with comma",
"description": "PowerJob-server node(s) address. Ip:port or domain, multiple addresses should be separated with comma",
"sourceType": "com.github.kfcfans.powerjob.worker.autoconfigure.PowerJobProperties$Worker"
},
{

View File

@ -1,7 +1,7 @@
package com.github.kfcfans.powerjob.worker.autoconfigure;
import com.github.kfcfans.powerjob.worker.OhMyWorker;
import org.junit.Assert;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@ -16,7 +16,7 @@ class PowerJobAutoConfigurationTest {
void testAutoConfiguration() {
ConfigurableApplicationContext run = SpringApplication.run(PowerJobAutoConfigurationTest.class);
OhMyWorker worker = run.getBean(OhMyWorker.class);
Assert.assertNotNull(worker);
Assertions.assertNotNull(worker);
}
}

View File

@ -1,2 +1 @@
powerjob.enable-test-mode=true