asp.net core 声明controller的方法 1, 对类名直接添加Controller, 如TestController. 2, 继承Controller 类。 3, 对类名添加controller的属性, 如[Controller]