随笔分类 - Spring MVC
摘要:可以在spring mvc里设置一个全局拦截器来作为token的验证,可以设置指定路径才拦截,例如/api/**路径才拦截。 <mvc:interceptors> <mvc:interceptor> <mvc:mapping path="/api/*" /> <bean class="com.blu
阅读全文
摘要:接着上一篇 Spring 4 mvc restful 系列之一 ,本篇主要是在第一篇的基础上为其添加持久层框架。 用到的orm为mybatis,dbcp和mysql。 1、首先在pom.xml里添加以上的依赖包 <!-- 持久层mybatis --> <dependency> <groupId>or
阅读全文
摘要:第一篇基本搬运自: http://websystique.com/springmvc/spring-mvc-4-restful-web-services-crud-example-resttemplate/ 首先创建一个maven工程并转换为web module 3.0版本。 一、基础环境 1、创建
阅读全文
摘要:记录一下这个问题。 首先,直接用eclipse生成一个dynamic web project 然后,将其转为maven project即可。
阅读全文

浙公网安备 33010602011771号