2016年2月14日

Spring+Quartz(定时任务)

摘要: 1.通过maven导入需要jar <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://m 阅读全文

posted @ 2016-02-14 22:01 LittlePony 阅读(665) 评论(0) 推荐(0) 编辑

Cron表达式说明

摘要: CronTrigger CronTriggers往往比SimpleTrigger更有用,如果您需要基于日历的概念,而非SimpleTrigger完全指定的时间间隔,复发的发射工作的时间表。 CronTrigger,你可以指定触发的时间表如“每星期五中午”,或“每个工作日9:30时”,甚至“每5分钟一 阅读全文

posted @ 2016-02-14 21:46 LittlePony 阅读(24643) 评论(2) 推荐(4) 编辑

SpringMVC综合使用手机管理系统Controller层开发

摘要: 1. beans.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XM 阅读全文

posted @ 2016-02-14 20:57 LittlePony 阅读(942) 评论(0) 推荐(0) 编辑

SpringMVC介绍之Validation

摘要: 对于任何一个应用而言在客户端做的数据有效性验证都不是安全有效的,这时候就要求我们在开发的时候在服务端也对数据的有效性进行验证。 SpringMVC 自身对数据在服务端的校验有一个比较好的支持,它能将我们提交到服务端的数据按照我们事先的约定进行数据有效性验证,对于不合格的数据信息 SpringMVC 阅读全文

posted @ 2016-02-14 20:46 LittlePony 阅读(518) 评论(0) 推荐(0) 编辑

SpringMvc中Interceptor拦截器用法

摘要: SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理。比如通过它来进行权限验证,或者是来判断用户是否登陆等。 一. 使用场景 1、日志记录:记录请求信息的日志,以便进行信息监控、信息统计、计算PV(Page View)等。 2、 阅读全文

posted @ 2016-02-14 20:35 LittlePony 阅读(15746) 评论(0) 推荐(0) 编辑

Spring组件扫描<context:component-scan/>使用详解

摘要: 1.如果不想在xml文件中配置bean,我们可以给我们的类加上spring组件注解,只需再配置下spring的扫描器就可以实现bean的自动载入。 <!-- 注解注入 --> <context:annotation-config></context:annotation-config> <conte 阅读全文

posted @ 2016-02-14 20:14 LittlePony 阅读(32433) 评论(0) 推荐(0) 编辑

spring与mysql整合数据源的配置

摘要: 需要解决两点,数据源的配置交给spring完成,事务管理交个spring来管理。 <context:property-placeholder location="classpath:conf/jdbc.properties" />//加载文件 <bean id="dataSource" class= 阅读全文

posted @ 2016-02-14 20:08 LittlePony 阅读(2294) 评论(0) 推荐(0) 编辑

spring替代方法

摘要: 总结spring替代方法的使用 MyValueCalculator类中的computerValue方法将会被替代 public class MyValueCalculator { public String computeValue(String input) { // some real code 阅读全文

posted @ 2016-02-14 20:01 LittlePony 阅读(791) 评论(0) 推荐(0) 编辑

spring 方法注入

摘要: package com.haut.grain.junit.test;public class Command {private Object state;public void setState(Object state) { this.state = state;}public Object ge 阅读全文

posted @ 2016-02-14 19:54 LittlePony 阅读(288) 评论(0) 推荐(0) 编辑

spring中scope(作用越)理解

摘要: 今天总结了一下spring中作用域scope的用法。在spring中作用域通过配置文件形式的用法如下。 <bean id="role" class="spring.chapter2.maryGame.Role" scope="singleton"/> 一. 在spring 中常用的作用域有单例模式( 阅读全文

posted @ 2016-02-14 19:18 LittlePony 阅读(4007) 评论(0) 推荐(0) 编辑

导航