资源简介

jar包直接运行,对外提供web服务,netty负责http协议,配合springMVC,再也不用tomcat了,因为没办法支持jsp,适合纯web服务的项目。

资源截图

代码片段和文件信息

package org.springframework.sandbox.mvc;

import com.google.gson.Gson;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping(“/hello“)
public class TestController {

@RequestMapping(value = “/foo“ produces = “text/html; charset=utf-8“)
public @ResponseBody String getShopInJSON(HttpServletRequest request String abc) {
//String abc = request.getParameter(“abc“);
if (abc == null)
return “什么也没收到“;
else
return abc + “  你好“;
}
@RequestMapping(value = “/upload“ produces = “text/html; charset=utf-8“)
public @ResponseBody String getShopInJSON(HttpServletRequest request String abc 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1226  2018-04-04 16:25  netty-spring-test2\.classpath

     文件        570  2018-03-22 17:54  netty-spring-test2\.project

     文件         93  2018-04-12 10:13  netty-spring-test2\.settings\org.eclipse.core.resources.prefs

     文件        243  2018-04-04 16:25  netty-spring-test2\.settings\org.eclipse.jdt.core.prefs

     文件         90  2018-03-22 17:54  netty-spring-test2\.settings\org.eclipse.m2e.core.prefs

     文件       1833  2018-03-22 18:00  netty-spring-test2\logs\netty-springmvc.log.2018-03-22.log

     文件      23252  2018-03-23 18:24  netty-spring-test2\logs\netty-springmvc.log.2018-03-23.log

     文件       7654  2018-04-04 17:04  netty-spring-test2\logs\netty-springmvc.log.2018-04-04.log

     文件      34897  2018-04-12 15:31  netty-spring-test2\logs\netty-springmvc.log.2018-04-12.log

     文件       3155  2018-04-04 16:25  netty-spring-test2\pom.xml

     文件        923  2018-04-12 14:58  netty-spring-test2\src\main\java\org\springframework\sandbox\mvc\TestController.java

     文件        441  2018-03-22 17:57  netty-spring-test2\src\main\java\org\springframework\sandbox\netty\AppConfig.java

     文件       2477  2018-04-04 17:05  netty-spring-test2\src\main\java\org\springframework\sandbox\netty\DispatcherServletChannelInitializer.java

     文件       1201  2018-03-23 10:04  netty-spring-test2\src\main\java\org\springframework\sandbox\netty\MyServer.java

     文件       9421  2018-04-12 15:18  netty-spring-test2\src\main\java\org\springframework\sandbox\netty\ServletNettyHandler.java

     文件        655  2018-03-23 10:15  netty-spring-test2\src\main\resources\applicationContext.xml

     文件       2188  2018-03-22 17:57  netty-spring-test2\src\main\resources\logback.xml

     文件        655  2018-08-14 11:42  netty-spring-test2\target\classes\applicationContext.xml

     文件       2188  2018-08-14 11:42  netty-spring-test2\target\classes\logback.xml

     文件        114  2018-10-19 17:12  netty-spring-test2\target\classes\meta-INF\MANIFEST.MF

     文件        251  2018-10-19 17:12  netty-spring-test2\target\classes\meta-INF\maven\netty-spring-test2\netty-spring-test2\pom.properties

     文件       3155  2018-10-19 17:12  netty-spring-test2\target\classes\meta-INF\maven\netty-spring-test2\netty-spring-test2\pom.xml

     文件       1555  2018-08-14 11:42  netty-spring-test2\target\classes\org\springframework\sandbox\mvc\TestController.class

     文件        603  2018-08-14 11:42  netty-spring-test2\target\classes\org\springframework\sandbox\netty\AppConfig.class

     文件       2803  2018-08-14 11:42  netty-spring-test2\target\classes\org\springframework\sandbox\netty\DispatcherServletChannelInitializer.class

     文件       2427  2018-08-14 11:42  netty-spring-test2\target\classes\org\springframework\sandbox\netty\MyServer.class

     文件      12803  2018-08-14 11:42  netty-spring-test2\target\classes\org\springframework\sandbox\netty\ServletNettyHandler.class

     目录          0  2018-03-22 17:57  netty-spring-test2\src\main\java\org\springframework\sandbox\mvc

     目录          0  2018-03-22 17:57  netty-spring-test2\src\main\java\org\springframework\sandbox\netty

     目录          0  2018-03-22 17:57  netty-spring-test2\src\main\java\org\springframework\sandbox

............此处省略26个文件信息

评论

共有 条评论