本项目使用SSM框架+Mysql实现,主要分为两种角色:管理员和普通用户,
普通用户可以登录注册并且发布兼信息,修改个人信息,发布帖子及收藏等功能
管理员可以管理兼职信息,管理帖子信息,聊天信息,管理用户信箱,收藏等,还可以进行系统轮播图及公告还要基本信息的管理
数据库见以下:分别为广告表、轮播图表、聊天表、收藏表、帖子信息表、帖子信息回复表、信箱表、公告信息表、系统设置表、用户表及兼职信息表
运行环境:eclipse\Myeclipse\IDEA +mysql+tomcat
部分截图见以下
兼职首页:
个人账户信息页面
兼职后台管理页面
项目结构
代码完整,逻辑清晰,适合学习及其他使用
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.2.xsd ">
<!-- 配置 读取properties文件 jdbc.properties -->
<context:property-placeholder location="classpath:jdbc.properties" />
<!-- 配置 数据源 -->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="driverClassName" value="${jdbc.driver}" />
<property name="url" value="${jdbc.url}" />
<property name="username" value="${jdbc.username}" />
<property name="password" value="${jdbc.password}" />
</bean>
<!-- 配置SqlSessionFactory -->
<bean class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 设置MyBatis核心配置文件 -->
<property name="configLocation" value="classpath:SqlMapConfig.xml" />
<!-- 设置数据源 -->
<property name="dataSource" ref="dataSource" />
<!-- <property name="mapperLocations" value="classpath:com/work/mapper/userMapper.xml" /> -->
</bean>
<!-- 事务依赖数据源 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<!-- 开启事务 -->
<tx:annotation-driven transaction-manager="transactionManager"/>
<!-- 配置Mapper扫描 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 设置Mapper扫描包 -->
<property name="basePackage" value="com.work.mapper" />
</bean>
<!-- 配置Service扫描 -->
<context:component-scan base-package="com.work.service" />
</beans>