详细报错信息:
org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaAutoServiceRegistration': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)


这个问题查了日志,其实是spring中存在,这种注入变量:

    @Value("${age}")
    private String age;

    @GetMapping("/age")
    public String getUsername() {
        return age;
    }
由于在配置文件中没有配置age所以会报错

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐