Browse Source

加java文档注释

k 2 years ago
parent
commit
f6d5a28b1d

+ 17 - 0
pom.xml

@@ -103,6 +103,23 @@
           <includeSystemScope>true</includeSystemScope>
         </configuration>
       </plugin>
+<!--      生成java文档注释-->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>3.2.1</version>
+        <!-- 绑定source插件到Maven的生命周期,并在生命周期后执行绑定的source的goal -->
+        <executions>
+          <execution>
+            <!-- 绑定source插件到Maven的生命周期 -->
+            <phase>compile</phase>
+            <!--在生命周期后执行绑定的source插件的goals -->
+            <goals>
+              <goal>jar-no-fork</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
       <!-- 跳过单元测试 -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>

+ 3 - 1
src/main/java/com/jwk/spring/boot/autoconfigure/ModbusAutoConfiguration.java

@@ -17,7 +17,9 @@ public class ModbusAutoConfiguration {
 
     /**
      * RTU-Master first
-     * 注入方式@Autowired(required = true) private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
+     * 注入方式:
+     * '@Autowired(required = true)'
+     * private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
      * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
      *
      * @param modbusProperties

+ 6 - 2
src/main/java/com/jwk/spring/boot/autoconfigure/ModbusProperties.java

@@ -15,12 +15,16 @@ public class ModbusProperties {
     public static final String DEMO_PREFIX = "modbus";
 
     /**
-     * 注入方式@Autowired(required = true) private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
+     * 注入方式:
+     * '@Autowired(required = true)'
+     * private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
      * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
      */
     private RtuMasterOrder rtuMaster;
     /**
-     * 注入方式@Autowired(required = true) private ModbusTcpMasterTemplate modbusTcpMasterTemplateFirst;
+     * 注入方式:
+     * '@Autowired(required = true)'
+     * private ModbusTcpMasterTemplate modbusTcpMasterTemplateFirst;
      * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
      */
     private TcpMasterOrder tcpMaster;

+ 5 - 0
src/main/java/com/jwk/spring/boot/autoconfigure/ModbusRtuMasterTemplate.java

@@ -6,6 +6,11 @@ import com.serotonin.modbus4j.exception.ModbusInitException;
 
 
 /**
+ * 注入方式:
+ * '@Autowired(required = true)'
+ * private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
+ * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
+ *
  * @author JWK
  * @version 1.0
  * @date 2022/9/7 17:00

+ 5 - 0
src/main/java/com/jwk/spring/boot/autoconfigure/ModbusTcpMasterTemplate.java

@@ -5,6 +5,11 @@ import com.jwk.spring.boot.modbus4j.ModbusTcpMaster;
 
 
 /**
+ * 注入方式:
+ * '@Autowired(required = true)'
+ * private ModbusTcpMasterTemplate modbusTcpMasterTemplateFirst;
+ * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
+ *
  * @author JWK
  * @version 1.0
  * @date 2022/9/7 17:00