Tag: spring

Spring的@ModelAttribute用法

wiflish | 技术 | 2014-05-26
@ModelAttribute有2个用途 1. 注解在方法上 @ModelAttribute publicAccount addAccount(@RequestParamString number) { returnaccountManager.findAccount(number); } // Add multiple attributes @ModelAttribute public voidpopulateModel(@RequestParamString number, Model model) { model.addAttribute(accountManager.findAccount(number)); // ... [阅读全文]

【转】Exception Handling in Spring MVC

wiflish | 技术 | 2014-05-23
【转】Exception Handling in Spring MVC
转自: http://spring.io/blog/2013/11/01/exception-handling-in-spring-mvc Spring MVC provides several complimentary approaches to exception handling but, when teaching Spring MVC, I often find that my students are confused or not comfortable with them. Today I’m going to show you the various options available. Our goal i... [阅读全文]

【转】深入学习微框架:Spring Boot

wiflish | 技术 | 2014-05-19
转自:  http://www.infoq.com/cn/articles/microframeworks1-spring-boot?utm_source=infoq&utm_medium=popular_links_homepage Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。通过这种方式,Boot致力于在蓬勃... [阅读全文]

【原】spring-mvc的返回结果支持根据参数输出xml或者json格式配置

wiflish | 代码, 技术 | 2014-05-15
spring-mvc.xml配置 <mvc:message-converters register-defaults="true"> <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter"> <property name="features"> <list> <value>WriteDateUseDateFormat</valu... [阅读全文]
Ɣ回顶部