在上一篇博文中简要介绍了下Java注解。
想到既然注解能做很多事,为嘛不让它来做权限控制呢?
ok,开工。
/**
* Created by veryyoung on 2014/12/24.
*/
public abstract class AbstractAuthenticationFilter extends
HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exceptio继续阅读 »
Solution & Estimations:
Current solution is to 1.) let Swarm launch tasks by Mesos 2.) for the other API, let Swarm send request to docker engine directly (red arrow)继续阅读 »
Swarm on Mesos Overview
Swarm API gets REST API request, and then create a task and put it into message queue.
Swarm Cluster (registered as Mesos framework) gets offer from Mesos
Swarm Cluster picks up a task from message queue
Swarm Cluster calls Scheduler’s routine to gets target host
Swarm Cluster calls Mesos 继续阅读 »
在Scrapy框架下
more
蚂蜂窝
```Python
coding=utf-8
import json
from urlparse import urljoin
import re
import logging
import scrapy
from scrapy.http import Request
from scrapy.selector import Selector
from andaman.utils.html import html2text, parse_time
from andaman.items.qa import QAItem
from andaman.items.jieban import Ji继续阅读 »
今天在用BeanUtils polulate bean的时候遇到了一下的异常:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.commons.beanutils.ConversionException: DateConverter does not support default String to 'Date' conversion.
看异常消息,是前端传来的字符串不能转换为Date类型的问题
解决方案:
编写String转换为Date的DateTime继续阅读 »