- 浏览: 50450 次
最新评论
-
zhangchengtest:
顶。。。。。。。
SpringMVC自定义日期类型的数据转换器
文章列表
@example
* // Create a comma separated list from an array of objects
* $(document).ready( function() {
* var oTable = $('#example').dataTable( {
* "sAjaxSource": "sources/deep.txt",
* "aoColumns": [
* { "mData" ...
springmvc 返回结果的转换
RequestMappingHandlerAdapter
ServletInvocableHandlerMethod:invokeAndHandle
RequestResponseBodyMethodProcessor:writeWithMessageConverters
AbstractMessageConverterMethodProcessor:writeWithMessageConverters
MappingJackson2HttpMessageConverter:write
com.fasterxml.jackson.databind.O ...
/**
* 模板viewResolver
*/
@Bean
public ViewResolver getViewResolver() {
VelocityLayoutViewResolver resolver = new VelocityLayoutViewResolver();
resolver.setSuffix(getViewSuffix());
resolver.setContentType(DEFAULT_CONTENT_TYPE);
resolver.setExposeRequestAttributes(true);
r ...
#macro(invoke $page)
#if($page.startsWith("/"))
#parse($page)
#else
#set($uri = $request.getAttribute("javax.servlet.include.request_uri"))
#if(!$uri)#set($uri = $request.getServletPath())#end
#set($path = $uri.substring(0, $uri.lastIndexOf( ...
1.实现AbstractAnnotationConfigDispatcherServletInitializer即可取代web.xml
/**
* Base class for {@link org.springframework.web.WebApplicationInitializer}
* implementations that register a
* {@link org.springframework.web.servlet.DispatcherServlet DispatcherServlet}
* configured with annotated clas ...
任何一个对象都是有wait notify notifyAll三个方法,
某一个对象wait后就会使得当前线程处于阻塞状态
然后另一个线程再调用该对象的notify或者notifyAll
即可唤醒之前的线程 使之处于Runnable状态
notifyAll是唤醒所有的该对象阻塞的线程
notify则是随机唤醒一个
而且以上方法只能在sychronized下运行
常见设计模式为生产者消费者模式
MyBatis级联关系
- 博客分类:
- mybatis
都是一条sql语句即可
1.has-one:association元素
<association property="" javaType="" resultMap="" />
2.has many:collection元素
<collection property="someList" resultMap="" >
此方法适用于springmvc4零配置
1.
/**
* springmvc String转换成Date
* @author test
*
*/
public class StringToDate implements Converter<String, Date> {
private static final Logger logger = LoggerFactory.getLogger(StringToDate.class);
@Override
public Date convert(String source) {
try {
return Da ...