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 — GitHub - hj1212/Netty-SpringMVC: netty 集成spring mvc,将其作为http服务发布, 支持get和post请求

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
src/main
src/main
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

netty 集成 spring mvc

将netty的HttpRequest和HttpResponse对象与servlet的对象进行相互转换。我采用了springtest提供的用来模拟HttpServletRequest和HttpServletResponse的类,这两个类也是它们的子类。 org.springframework.mock.web.MockHttpServletRequest; org.springframework.mock.web.MockHttpServletResponse;

项目功能

  • 支持spring mvc的controller中,注解方式获取参数
  • 支持返回json
  • 支持post请求

如何测试

  • 下载项目,启动org.springframework.sandbox.netty.MyServer
  • 浏览器访问 http://localhost:8080/hello/foo, 如果返回结果,表示启动成功

如何打包并发布

  • 使用maven打包:mvn package
  • 启动jar:java -jar target/Netty-SpringMVC-1.0.0-SNAPSHOT.jar
  • 浏览器访问 http://localhost:8080/hello/foo, 如果返回结果,表示启动成功

如何添加自己的业务

  • 在org.springframework.sandbox.mvc.TestController中,你可以添加自己的方法

待添加的功能

  • 热部署(Hot deployment)
  • 集群(cluster)

版本信息

  • 0.0.2 : 集成mybatis
  • 0.0.1 : 实现netty+springMVC的集成

About

netty 集成spring mvc,将其作为http服务发布, 支持get和post请求

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — 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.