package com.crm.globex.controller;

import com.crm.globex.service.CustomLoginDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: houn
 * @create: 2020-07-24 11:06
 **/
@RestController
@RequestMapping("/custom/login/demo")
public class CustomLoginDemoController {
    @Autowired
    private CustomLoginDemoService customLoginDemoService;

    /**
     * 定时器 修改demo账号
     * @throws Exception
     */
    @Scheduled(fixedDelay = 5000)
    public void scheduleAutomaticLogin() throws Exception {

        customLoginDemoService.scheduleAutomaticLogin();
    }

}
