whyclxw
2024-11-25 4fc7909358cc62231c81b8e871749fc1b3fa69bd
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);
    }