根据最近做的员工后台管理程序,对所用的SSM框架以及前端的一些框架(bootstrap+jQuery)进行总结。
3.为了使用注释语法,首先需要进行注释配置,同时自动配置扫描器:
<context:annoation-config/>
<context:component-scan base-package="package"></context:component-scan>;
4.为了防止spring MVC 过滤掉静态资源,需要加 <mvc:annotation-driven />注解(即支持mvc注解);
5.加阿里巴巴数据源管理:
一、SSM框架
1.1使用开发工具
1.eclipse(luna以上版本)+tomcat(8.0);
2.数据库:MySql数据库
1.2需要导入jar包
1.3spring.xml配置内容
1.导入jar包
2.配置xml头部内容:
<context:annoation-config/>
<context:component-scan base-package="package"></context:component-scan>;
4.为了防止spring MVC 过滤掉静态资源,需要加 <mvc:annotation-driven />注解(即支持mvc注解);
5.加阿里巴巴数据源管理:
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
destroy-method="close"
init-method="init">
</bean>
6.开启事务管理器:
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>;
7.mybatis整合:
8.视图解析器:
1.4web.xml配置内容
1.context-param
2.filter+filter mapping
3.listener
4.servert+servlet mapping