2025-03-02 01:40:08 +08:00
|
|
|
package cn.qihangerp.oms;
|
2024-03-11 14:15:25 +08:00
|
|
|
|
2024-03-11 14:39:29 +08:00
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
2024-03-11 14:15:25 +08:00
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
2025-03-02 01:40:08 +08:00
|
|
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
2025-04-24 21:24:50 +08:00
|
|
|
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
|
|
|
|
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
2024-03-11 14:15:25 +08:00
|
|
|
import org.springframework.context.annotation.ComponentScan;
|
2025-04-24 21:24:50 +08:00
|
|
|
import org.springframework.web.client.RestTemplate;
|
2024-03-11 14:15:25 +08:00
|
|
|
|
|
|
|
|
//@EnableDiscoveryClient
|
2025-03-02 01:40:08 +08:00
|
|
|
//@MapperScan("cn.qihangerp.oms.mapper")
|
2025-04-24 21:24:50 +08:00
|
|
|
@EnableFeignClients(basePackages = "cn.qihangerp.oms")
|
2025-03-02 01:40:08 +08:00
|
|
|
@EnableDiscoveryClient
|
|
|
|
|
@ComponentScan(basePackages={"cn.qihangerp"})
|
2024-03-11 14:15:25 +08:00
|
|
|
@SpringBootApplication
|
2024-03-11 14:39:29 +08:00
|
|
|
public class OmsApi {
|
2024-03-11 14:15:25 +08:00
|
|
|
public static void main( String[] args )
|
|
|
|
|
{
|
|
|
|
|
System.out.println( "Hello oms-api!" );
|
2024-03-11 14:39:29 +08:00
|
|
|
SpringApplication.run(OmsApi.class, args);
|
2024-03-11 14:15:25 +08:00
|
|
|
}
|
2025-04-24 21:24:50 +08:00
|
|
|
@Bean
|
|
|
|
|
@LoadBalanced
|
|
|
|
|
public RestTemplate restTemplate() {
|
|
|
|
|
return new RestTemplate();
|
|
|
|
|
}
|
2024-03-11 13:32:51 +08:00
|
|
|
}
|