爱玺玺

爱玺玺的生活日记本。wx:lb87626

Spring配置文件中定义bean的name属性和id属性的区别

id属性中必须有值且在整个项目中(至少是受spring管理的模块配置信息中)必须唯一。

name属性则比较宽松,可以在name属性中为某个类指定多个名称,每个名称用逗号或分号隔开


spring配置struts的action的bean的属性需要用个接口。

那么我现在就把这个属性配置在applicationContext.xml的bean里。

   <!-- 配置action -->

   <bean name="/login" class="cn.lb.web

让spring接管struts配置

在struts-config.xml中添加


<controller>

 <set-property property="processorClass" value="org.sprin

跟谁被跟谁,发送者接受者表在设计

QQ图片20180321155446.gif

foud是被跟随的人

uid是跟随的人

我跟随了谁 uid=我的uid

谁跟随了我 我是被跟随的人 fouid=我的uid


类似聊天表

web.xml配置spring,在action中使用aplicationContext

web.xml配置struts和spring

hql的createQuery()检索设置参数默认从0开始

hql的createQuery()检索设置参数默认从0开始

mysql更新字段为“”或 null

//更新为""串

update taxi_driver_info set wechat = '' where driverno = '123';


//更新为null

update taxi_driver_info set wechat = null where driverno = '123';


ssh使用注解事务管理注意写的位置

@Transactional

//@Transaction一定要在类定义的前面写,否则要报错

public class EmployerServiceImp implements EmployerServiceInter {

    public SessionFactory sessio

ssh启用事务注解

<!-- 启用事务注解 -->

<tx:annotat

ssh使用事务管理

<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">

  

Powered By Z-BlogPHP 1.4 Deeplue Build 150101

Copyright Your WebSite.Some Rights Reserved.

蜀ICP备11021721号-5