@ResponseStatusアノテーションを使うだけ。 @ResponseStatus(HttpStatus.OK) @RequestMapping(method = { RequestMethod.POST }) public void methodName(@RequestParam("Id") Integer id) { ... } ...
もっと読む
カテゴリ: Spring
Spring MVCでリクエストパラメータを日付型に変換してControllerに渡す
だれかの海外blogから。Controllerにこういうメソッドがあるとして、Spring MVCではリクエストパラメータをDateに変換してくれない。 @RequestMapping(method = { RequestMethod.POST }) public MappingJacksonJsonView methodName(@RequestParam("date") Date date) { ... ...
もっと読む
SpringですべてのメソッドにAOPでDebugInterceptorを適用する
<bean id="debugInterceptor" class="org.springframework.aop.interceptor.DebugInterceptor" /> <aop:config> <aop:advisor advice-ref="debugInterceptor" pointcut="execution(* .*(..))" /> </aop:config> ...
もっと読む
Unable to locate Spring NamespaceHandler for XML schema namespace
[java] 2010/01/09 21:51:29 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions [java] 情報: Loading XML bean definitions from file [/Users/jyukutyo/Documents/workspace/1-3-2/beans.xml] [java] Exception in threa ...
もっと読む
Spring 3.0 GA!
Spring Downloads | SpringSource.orgリリースされましたね!Spring 3.0!まあ3.0になったからと言って劇的な変化はないようですが。さっそくダウンロードしましたが、with-dependenciesアーカイブがないのとspring.jarで固まってるのはないんですね。いちいち各プロダクトの ...
もっと読む