配置文件
xxx-system\src\main\resources\application-dev.yml
threed:
rcs_rest_host: http://10.60.2.166:8888
rcs_ws_host: ws://10.60.2.166:8888
config文件
xxx-system\src\main\java\org\jeecg\modules\threed_model\config\ThreedConfig.java
@Data
@Configuration
@ConfigurationProperties(prefix = "threed")
public class ThreedConfig {
private String rcs_rest_host;
private String rcs_ws_host;
@Bean
public WarehouseRcsWs applicationWarehouseRcsWs() {
return new WarehouseRcsWs(rcs_ws_host);
}
}
使用文件
xxx-system\src\main\java\org\jeecg\modules\threed_model\controller\ThreedRestController.java
@RestController
@RequestMapping("/threed_model")
public class ThreedRestController {
@Autowired
private ThreedConfig threedConfig;
}