首页 > 解决方案 > Spring Boot Controller 在 Spring 工具套件中不起作用

问题描述

我无法理解为什么我的控制器没有运行。目前我正在使用 Spring 工具套件 4。这是我的控制器。

package com.ctl.reporting.collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HoshpiCashCollectionController {

    @Autowired
    HoshpiCashCollectionRepository repo;

    @GetMapping("/getHoshpiCash")
    public void  getHoshpiCashCollection(){
        
        System.out.print("Controller Working...");
        
    }
}

告诉我如何解决这个问题。

标签: spring

解决方案


推荐阅读