fast is a API framework base on spring mvc.
java version required JDK8
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<name>Private Nexus</name>
<url>http://repo.dingdingyisheng.mobi/repository/maven-public</url>
</mirror>
<dependency>
<groupId>org.smartx</groupId>
<artifactId>fast-core</artifactId>
<version>1.0</version>
</dependency>
fast.api.key - message sign key
fast.api.timeout - combine request api timeout, default 10s
fast.api.session - defalut map, 'map' means use java map stores session datas, 'redis' means use redis stores session datas.
- json support
<mvc:annotation-driven>
<mvc:message-converters register-defaults="true">
<bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/html;charset=UTF-8</value>
<value>application/json;charset=UTF-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
support RequestMappingHandlerMapping in CombineController and return JSON message format.
- spring annotations support
<context:annotation-config/>
support @Resource @Component annotations.
- SpringContextHolder bean
please reference to fast-demo project for more details.
- bean sessionContextSupport with lazy-init = true
<bean id="sessionContextSupport" class="org.smartx.fast.session.SessionContextSupport" lazy-init="true"/>
- redis support
- add org.smartx.redis in component-scan
<context:component-scan base-package="org.smartx.fast, org.smartx.redis">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
- add jedisCluster bean(reference redis.xml in fast-demo project)
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="${redis.pool.maxTotal}"/>
<property name="maxIdle" value="${redis.pool.maxIdle}"/>
<property name="minIdle" value="${redis.pool.minIdle}"/>
<property name="testOnBorrow" value="${redis.pool.testOnBorrow}"/>
</bean>
<bean id="jedisCluster"
class="org.smartx.redis.JedisClusterConnectionFactoryBean">
<property name="servers" value="${redis.servers}"/>
<property name="poolConfig" ref="jedisPoolConfig"/>
</bean>
- bean redisSessionContext
<bean id="redisSessionContext" class="org.smartx.fast.session.RedisSessionContext"/>