产品管理页面
页面介绍
旅游管理系统基于JavaSSM框架,Maven,Mysql数据库,Bootstrap动态页面,springMVC,mybatis等,其中产品管理页面有增删改查,动态显示,分页显示,多行删除的功能。
后台代码
依赖安装(pom.xml)
pom.xml作为Maven架构中用于管理:源代码、配置文件、开发者的信息和角色、问题追踪系统、组织信息、项目授权、项目的url、项目的依赖关系的文件。十分重要,首先要在pom文件中把项目所要用到的相关依赖插件安装。
项目资源配置(resource)

applicationContext.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="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
<!-- 开启注解扫描,管理service和dao -->
<context:component-scan
base-package="com.yzw.service">
</context:component-scan>
<context:component-scan
base-package="com.yzw.dao">
</context:component-scan>
<context:property-placeholder location="classpath:db.properties" />
<!-- 配置数据库数据源 -->
<bean id="dataSource"
class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${jdbc.driver}" />
<property name="jdbcUrl" value="${jdbc.url}" />
<property name="user" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
</bean>
<!-- 创建spring工厂 -->
<bean id="sqlSessionFactory"
class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- 传入PageHelper的插件 -->
<property name="plugins">
<array>
<!-- 传入插件的对象 -->
<bean class="com.github.pagehelper.PageInterceptor">
<property name="properties">
<props>
<prop key="helperDialect">mysql</prop>
<prop key="reasonable">true</prop>
</props>
</property>
</bean>
</array>
</property>
</bean>
<!-- 扫描dao/mapper接口文件 -->
<bean id="mapperScanner"
class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.yzw.dao" />
<!-- 如果还有有些专门针对于mybatis的配置,需要引入 -->
</bean>
</beans>
该文件用于配置数据源和过滤扫描器
db.properties
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/pms?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&rewriteBatchedStatements=true
jdbc.username=root
jdbc.password=12345678
## P6SpyDriver
jdbc.driver=com.p6spy.engine.spy.P6SpyDriver
jdbc.url=jdbc:p6spy:mysql://localhost:3306/pms?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&rewriteBatchedStatements=true
jdbc.username=root
jdbc.password=12345678
该文件用于连接mysql数据库
log4j.properties
### 设置###
log4j.rootLogger = debug,stdout,D,E
### 输出信息到控制台 ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout

&spm=1001.2101.3001.5002&articleId=109390904&d=1&t=3&u=db49b53b4c5c43dc917b4ddb88efb006)
6177

被折叠的 条评论
为什么被折叠?



