GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — thrift-spring/README.md at master · Dior222/thrift-spring

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
30 lines (28 loc) · 864 Bytes
/

README.md

Copy path

File metadata and controls

30 lines (28 loc) · 864 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions

thrift-spring

实现thrift服务端集成spring,采用TThreadPoolServer同步线程池做默认服务,传输协议采用默认的TBinaryProtocol 调用方式参考test中的示例 #集成spring步骤(参考test示例)
1)spring配置中配置

<context:component-scan base-package="com.upsoft.thrift"></context:component-scan>  
<bean class="com.xjkwq1qq.core.ThriftServiceApplication" />

2)在服务实现类上添加注解@ThriftService 如示例中所示:

@ThriftService("HelloService")
public class HelloServiceImpl implements HelloService.Iface {
	@Override
	public String getNode() throws TException {
		return "HelloWorld";
	}
}

3)thrift服务的端口配置 在配置文件thrift-spring.properties中设置

#port default 9090;
thrift.port=9091

如果不设置默认是9090端口 服务端便启动完成

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.