taotao-manager-web 表现层工程的配置与开发

 

TestController.java

package com.taotao.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.taotao.service.TestService;

/**
 * 查询当前的时间
 */
@Controller
public class TestController {
	
	@Autowired
	private TestService testservice;
	
	@RequestMapping("/test/qureyNow")
	@ResponseBody
	public String queryNow(){
		//1.引入服务 :在springmvc.xml中"引用dubbo服务"
		//2.注入服务
		//3.调用服务的方法
		return testservice.queryNow();
	}
	
}

  

 

Dubbo原理

 

 

posted @ 2020-04-06 13:09  尐鱼儿  阅读(152)  评论(0编辑  收藏  举报