whyclxw
2024-10-09 4de4e1fcb38028c4b18d45c68705a107945c3736
修改restemlate
2个文件已修改
16 ■■■■■ 已修改文件
src/main/java/com/whyc/LithiumBmsApplication.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/controller/DevA200TestparamController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/LithiumBmsApplication.java
@@ -3,12 +3,22 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Scope;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@EnableWebMvc
@SpringBootApplication
@ServletComponentScan(basePackages = {"com.whyc.filter"})
public class LithiumBmsApplication {
    @Bean
    @Scope("prototype")
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }
    public static void main(String[] args) {
        SpringApplication.run(LithiumBmsApplication.class, args);
    }
src/main/java/com/whyc/controller/DevA200TestparamController.java
@@ -39,6 +39,12 @@
        return service.setA200ParamPl(param);
    }
    /*@ApiOperation(value = "批量设置a200一体机参数(测试多线程)")
    @PostMapping("setA200ParamPl2")
    public Object setA200ParamPl2(@RequestBody A200ResDto param){
        return service.setA200ParamPl2(param);
    }*/
    @ApiOperation(value = "启动a200一体机放电/充电")
    @GetMapping("startA200Param")
    public Object startA200Param(@RequestParam int devId,@RequestParam int type){