INNER CODE UNIT · Java

main

7040210/SuperBoot · super-boot-gateway/src/main/java/org/superboot/GateWayService.java:27

    public static void main(String[] args) {
        SpringApplication.run(GateWayService.class, args);
    }

    @Autowired
    private Pub_DBUtils pub_DBUtils;

    /**
     * 扫描URL,如果数据库中不存在,则保存入数据库
     */
    //这个注解很重要,可以在每次启动的时候检查是否有URL更新,RequestMappingHandlerMapping只能在controller层用。这里我们放在主类中
    @PostConstruct
    public void detectHandlerMethods() {
        pub_DBUtils.addApiToDB();
    }
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…