spring - 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...");
}
}
告诉我如何解决这个问题。
解决方案
推荐阅读
- reactjs - redux-saga 在第二次调用时完成请求
- java - 来自 Windows 应用程序 C# 的 Java SOAP Web 服务标头身份验证调用
- laravel - 当 laravel 中的存储文件无法打开流时
- flutter - 在 Flutter 中使用 CupertinoApp 和 MaterialApp 的困惑
- python - 如何在网页上提交以使用python下载文件
- angular - 日期管道在显示时在表格中显示 04 而不是 03
- excel - Power Query - 从 AnalysisServices (Cube) 获取数据 - 使用用户函数结果进行筛选
- scala - Scala数据框:从List到String的列类型
- python - 尝试 except 在函数内部不起作用,但在外部起作用
- sqlite - SQLite:触发器检查新插入的行是否符合另一个表中的限制