diff --git a/powerjob-worker-spring-boot-starter/src/main/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfiguration.java b/powerjob-worker-spring-boot-starter/src/main/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfiguration.java index d47654f2..577d7db6 100644 --- a/powerjob-worker-spring-boot-starter/src/main/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfiguration.java +++ b/powerjob-worker-spring-boot-starter/src/main/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfiguration.java @@ -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); diff --git a/powerjob-worker-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json b/powerjob-worker-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json index 50a617fb..01a0eb3d 100644 --- a/powerjob-worker-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json +++ b/powerjob-worker-spring-boot-starter/src/main/resources/META-INF/spring-configuration-metadata.json @@ -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" }, { diff --git a/powerjob-worker-spring-boot-starter/src/test/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfigurationTest.java b/powerjob-worker-spring-boot-starter/src/test/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfigurationTest.java index dd90d395..62dfa4a2 100644 --- a/powerjob-worker-spring-boot-starter/src/test/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfigurationTest.java +++ b/powerjob-worker-spring-boot-starter/src/test/java/com/github/kfcfans/powerjob/worker/autoconfigure/PowerJobAutoConfigurationTest.java @@ -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); } } diff --git a/powerjob-worker-spring-boot-starter/src/test/resources/application.properties b/powerjob-worker-spring-boot-starter/src/test/resources/application.properties index fbcb42fa..46f6cdd3 100644 --- a/powerjob-worker-spring-boot-starter/src/test/resources/application.properties +++ b/powerjob-worker-spring-boot-starter/src/test/resources/application.properties @@ -1,2 +1 @@ - powerjob.enable-test-mode=true \ No newline at end of file