package com.bwie.controller;

import com.bwie.service.ScheduledPrintNameService;
import lombok.AllArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;

/**
 * @Author：yang
 * @Package：com.bwie.controller
 * @Project：day_4
 * @name：ScheduledPrintNameController
 * @Date：2024/7/22 8:50
 */
@Controller
@AllArgsConstructor
public class ScheduledPrintNameController {

    private final ScheduledPrintNameService service;
    private final static String BY_NAME = "me.yueng";

    /**
     * 打印名字
     */
    @Scheduled(cron = "0/5 * * * * ?")
    public void ScheduledByName(){
        service.ScheduledByName(BY_NAME);
    }

}
