1
zj
2024-07-21 efa6ea80aba153fa07458baedd0d730505fe9665
websocketSerivce/src/main/java/org/example/WsServerApplication.java
@@ -1,8 +1,14 @@
package org.example;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.checkerframework.checker.units.qual.A;
import org.example.server.CurrencySerivce;
import org.example.server.impl.CurrencySerivceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
@@ -19,5 +25,13 @@
    public static void main(String[] args) {
        SpringApplication.run(WsServerApplication.class, args);
    }
    @Autowired
    private CurrencySerivce currencySerivce;
    @Bean
    public void start() throws JsonProcessingException {
        currencySerivce.start();
    }
}