
然后如果我在代码中
使用new CountDownLatch(1).await();让服务阻塞,他确实不自动退出了。但是其他前端登录就进行不了了。虽然可以发送验证码,但是登录不了
@SpringBootApplication
@EnableDubbo
@EnableDiscoveryClient
public class AccountProviderApplication /*implements CommandLineRunner*/ {
@Resource
private IAccountTokenService accountTokenService;
public static void main(String[] args) {
SpringApplication springApplication = new SpringApplication(AccountProviderApplication.class);
springApplication.setWebApplicationType(WebApplicationType.NONE);
springApplication.run(args);
}
@Override
public void run(String... args) throws Exception {
new CountDownLatch(1).await();
}
}
这个问题要怎么解决,问了问chat也没解决