类名前:
@Repository 持久层(即DAO组件)
@Service 业务层
@Controller 控制层(如struts中的action)
@Component 对那些比较中立的类进行注释
组件扫描:
<context:component-scan base-package="com.xwtech.ecu.framework.*"/>
SpringMvc
@RequestParam(value=“id” ,required=true) String id2 或者
@RequestParam( “id” ) String id2
将请求中id变量的值绑定到id2上面, required默认为true 是否必须传值
Required为false 可不传时,如果没传,默认为null. 如果用int等变量接收时就报错