本月博客排行
-
第1名
青否云后端云 -
第2名
e_e -
第3名
vipbooks - silverend
- lemonhandsome
- kingwell.leng
- jveqi
- xiangjie88
年度博客排行
-
第1名
青否云后端云 -
第2名
zw7534313 -
第3名
大家都说我很棒 - liyihz2008
- wy_19921005
- gengyun12
- hbxflihua
- e_e
- luxurioust
- dbagirl
- zysnba
- Alsmile
- robotmen
- gaozzsoft
- jywhltj
- cpongo1
- leslie26
- qepwqnp
- zhangdaiscott
- 解宜然
- cuityang
- sichunli_030
- gashero
- fantaxy025025
- ranbuijj
- gdpglc
- ssydxa219
- wallimn
- vipbooks
- 淡看人生
- hanbaohong
- jickcai
- javashop
- johnsmith9th
- appalese
- gaojingsong
- weiyides
- zhangyi0618
- java-007
- AVI
- laiyangdeli
- lyongq04
- xpenxpen
- liunancun
- 龙哥IT
- conkeyn
- nychen2000
- lyndon.lin
- ouanui
- panshunchang
最新文章列表
Spring 配置文件报错:元素 "context:component-scan" 的前缀 "context" 未绑定。- spring经典问题(无敌篇)
【现象】:
1.spring配置信息如下
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.or ...
Spring+Mybatis+Maven+MySql搭建实例
http://blog.csdn.net/evankaka/article/details/48784641
一、准备工作
1. 首先创建一个表:
CREATE TABLE `t_user` (
`USER_ID` int(11) NOT NULL AUTO_INCREMENT,
`USER_NAME` char(30) NOT NULL,
`USER_PASSWORD` cha ...
Spring no xml的各种配置及单元测试
不使用任何xml配置文件,也没有web.xml,只用注解来配置Spring,整合Hibernate,Mybatis,Spring MVC以及其他Spring的开源项目。
仅供参考,风格不同,个人喜好。
Class风格的web.xml
import javax.servlet.ServletContext;
import javax.servlet.ServletExcepti ...
Spring配置学习
首先来看一个标准的Spring配置文件 applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="ht ...
web.xml之Spring配置(基于Spring+Struts+Ibatis)
指定Spring配置文件位置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring-dao-bean.xml,/WEB-INF/spring-resources.xml,
/WEB-INF ...
Spring配置文件,SSH, Struts+Spring+ibatis ,(MySQL数据库)
关于Spring的配置文件和数据源配置方式(MySQL数据库)
以下为自动注解Spring bean (Struts2 + Spring + hibernate)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org ...
spring scope="prototype" 学习笔记
<bean id="meetAction" class="com.web.actions.MeetsAction"
scope="prototype">
<property name="meetsService" ref="meetsService" />
</ ...
Spring事务管理(使用注解)
Spring事务管理使用注解远比使用配置方便,这里就演示一下如何使用注解:(Spring版本:3.1.1)
1>导入事务jar包:org.springframework.transaction-3.0.6.RELEASE.jar
2>修改Spring配置文件applicationContext.xml
<?xml version="1.0" enco ...
Spring 配置声明式事务
在使用spring集成hibernate时,我们可以用下面的代码来配置声明式事务。
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*&quo ...
spring 加载多个配置文件
FROM: http://bluexp29.blog.163.com/blog/static/33858148200991622842425
加载器目前有两种选择:ContextLoaderListener和ContextLoaderServlet。推荐使用ContextLoaderListener 这两者在功能上完全等同,只是一个是基于Servlet2.3版本中新引入的Li ...
Spring配置
1 使用Spring自带的DriverManagerDataSource<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"> ...