随笔分类 -  Spring

摘要:EBJ beans.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop=" 阅读全文
posted @ 2012-05-05 20:39 j2ee技术 阅读(650) 评论(0) 推荐(0)
摘要:Service 端:(注:org.springframework.web.servlet.DispatcherServlet)配置文件中.xml <!-- RMI --> <bean id="accountServiceImpl" class="com.spring.service.impl.AccountServiceImpl" /> <bean class="org.springframework.remoting.rmi.RmiServiceExporter"> <property na 阅读全文
posted @ 2012-05-01 18:52 j2ee技术 阅读(384) 评论(0) 推荐(0)
摘要:先看applicationContext.xml下面的beans<!-- Trigger --> <bean id="autoJob" class="com.spring.app.AutoJob" /> <bean id="autoTask" class="com.spring.app.AutoTask" /> <bean name="autoWeekly" class="org.springframework.scheduling.quart 阅读全文
posted @ 2012-05-01 18:43 j2ee技术 阅读(1090) 评论(0) 推荐(0)
摘要:错误如下:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Initialization of bean failed; nested exception is 阅读全文
posted @ 2012-04-30 20:57 j2ee技术 阅读(547) 评论(0) 推荐(0)
摘要:spring.xml<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="h 阅读全文
posted @ 2012-04-28 17:35 j2ee技术 阅读(493) 评论(0) 推荐(0)
摘要:在beans.xml中加入两个必须的bean <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="/WEB-INF/jdbc.properties" /> </bean> <bean id="dataSource" clas 阅读全文
posted @ 2012-04-26 15:03 j2ee技术 阅读(461) 评论(0) 推荐(0)
摘要:从web.xml开始,申明:现在只做了可以上传了,还有细节没有做好。<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" x 阅读全文
posted @ 2012-04-24 16:57 j2ee技术 阅读(305) 评论(0) 推荐(0)
摘要:用Spring MVC做文件上传,at org.apache.commons.fileupload.disk.DiskFileItem.get(DiskFileItem.java:329) at org.springframework.web.multipart.commons.CommonsMultipartFile.getBytes(CommonsMultipartFile.java:114) at org.springframework.web.multipart.support.ByteArrayMultipartFileEditor.setValue(ByteArrayMulti.. 阅读全文
posted @ 2012-04-24 16:43 j2ee技术 阅读(663) 评论(0) 推荐(0)
摘要:Spring是一个完整的J2EE框架和解决方案,完整并且模块化,你可以用的他的全部也可以只用他的一部分特性,Spring 包含 IoC, AOP, 事务处理,ORM, 也包括一个简单的MVC框架. 用Spring,自我感觉,可以使你的代码至少节约30%,它的很多template很不错的,比如简单封装后的jdbctemplate,jmstemplate等。ioc用后就会爱不释手,它让你的代码风格完全改观。以前我要产生个对象,绝大多数时候只回想到new一个对象,而用spring的ioc,beanfactory,只需要配置一个xml文件即可。这种方式实现了松偶合,对单... 阅读全文
posted @ 2012-04-23 17:15 j2ee技术 阅读(907) 评论(0) 推荐(0)
摘要:Spring提供了一个用于简化JMS API使用的抽象框架,并且对用户屏蔽了JMS API中1.0.2和1.1版本的差异。JMS的功能大致上分为两块,叫做消息制造和消息消耗。JmsTemplate 用于制造消息和同步消息接收。和Java EE的事件驱动Bean风格类似,对于异步接收消息,Spring提供了一些消息侦听容器来创建消息驱动的POJO(MDP)。消息域的统一JMS规范有两个主要的版本,1.0.2和1.1。JMS1.0.2定义了两种消息域,点对点(队列)和发布/订阅(主题)。JMS 1.0.2的API为每个消息域提供了一个平行的类层次结构。导致客户端应用只能使用特定消息域的JMS AP 阅读全文
posted @ 2012-04-23 15:29 j2ee技术 阅读(349) 评论(0) 推荐(0)