Browse Source

组件注释修改

k 2 years ago
parent
commit
90f15bb66b

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

@@ -18,9 +18,10 @@ public class ModbusAutoConfiguration {
     /**
      * RTU-Master first
      * 注入方式:
-     * '@Autowired(required = true)'
+     * '@Autowired(required = false)'
+     * '@Qualifier("modbusRtuMasterTemplateFirst")'
      * private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
-     * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
+     * 在某些特定情况下,没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
      *
      * @param modbusProperties
      * @return

+ 3 - 2
src/main/java/com/jwk/spring/boot/autoconfigure/ModbusRtuMasterTemplate.java

@@ -7,9 +7,10 @@ import com.serotonin.modbus4j.exception.ModbusInitException;
 
 /**
  * 注入方式:
- * '@Autowired(required = true)'
+ * '@Autowired(required = false)'
+ * '@Qualifier("modbusRtuMasterTemplateFirst")'
  * private ModbusRtuMasterTemplate modbusRtuMasterTemplateFirst;
- * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
+ * 在某些特定情况下,没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
  *
  * @author JWK
  * @version 1.0

+ 3 - 2
src/main/java/com/jwk/spring/boot/autoconfigure/ModbusTcpMasterTemplate.java

@@ -6,9 +6,10 @@ import com.jwk.spring.boot.modbus4j.ModbusTcpMaster;
 
 /**
  * 注入方式:
- * '@Autowired(required = true)'
+ * '@Autowired(required = false)'
+ * '@Qualifier("modbusTcpMasterTemplateFirst")'
  * private ModbusTcpMasterTemplate modbusTcpMasterTemplateFirst;
- * 没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
+ * 在某些特定情况下,没有open=true的bean千万不要注入,@Autowired(required = false)也不行.
  *
  * @author JWK
  * @version 1.0