In Spring webmvc, there is a specifial servlet which is the portal between Servlet container and Spring webmvc framework. It's the DispatcherServlet. A spring web application usually maps all requst to this DispatcherServlet. A servlet's job is take in a HttpServletRequest, do all the business process...
Thursday, March 31, 2016
What are default handlers/resolvers in Spring DispatcherServlet
Spring webmvc's DispatcherServlet rely on several important notions. HandlerMapping - find which controller's which method to process current http request. HandlerAdapter - use HandlerMapping's result, actually make performe the request handling, return a ModelAndView object ViewResolver - find...
Tuesday, March 29, 2016
How to use distributed JMeter to test netty server performance
JMeter is good at performance testing. Usually, we often need more than one hosts to send traffic to one server to see how the sever behaves. This Many-To-One test scenario is called distributed testing. In JMeter's world, the hosts, which generate traffic, are called 'jmeter server'. You...
Thursday, March 24, 2016
Netty tutorial - hello world example
Netty is a NIO client server framework which enables quick and easy development of network applications. In this tutorial the basic concepts of Netty are introduced, as well as a hello world level example. This hello world example, based on Netty 4, has a server and a client, including heart beat...
Thursday, March 17, 2016
Hello world Spark example
In this article, there is 3 hello world level demos. The difference is where does the spark get its input data. The first one, spark get its input data from external socket server. This method is often used in testing or developing phase. The second demo, spark get its input data from Flume...
Wednesday, March 16, 2016
How to send message to Flume (avro or thrift) in Java
Apache Flume is mostly used to transfer data from "Out-of-Hadoop" world into Hadoop family. In Flume, every message transfered is called 'Event', input is call "Source", output is called "Sink". 1. Flume Source & Sink type Flume has many input and output types. Here are some wildly...
Friday, March 4, 2016
Java-based Spring mvc configuration - with Spring security
This article need you already understand how to config Spring mvc in java-based configuration without Spring security. If not, check this article first on "Java-based Spring mvc configuration - without Spring security" This article is a hello world level spring mvc application with following features:...
Thursday, March 3, 2016
Replace jpa persistence.xml with java based configuration in Spring
Jpa 's /META/INF/persistence.xml with transaction-type set "RESOURCE_LOCAL" can be replace in spring configuration. The demo persistence.xml looks like below.<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence...
Wednesday, March 2, 2016
Java-based Spring mvc configuration - without Spring security
Spring 3+ supports using java-based configuration in replacement of the tradictional web.xml. You can replace web.xml with any class which implments interface org.springframework.web.WebApplicationInitializer ( which only has one onStartup() method). Usually all you need to provide to a web.xml for...
Subscribe to:
Posts (Atom)
Powered by Blogger.
About The Author

View my complete profile