技术标签: 笔记 LayUI maven mybatis mysql 宿舍管理
学生宿舍管理系统。
依次是管理员表,登录日志,班级表,打扫记录表,宿舍表,维修记录表,菜单表,角色表,中间表,学生表。下面是菜单表:
<?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:contxt="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<!-- 扫描 控制层 (web) 下面 @Controller 注解的类 将其实例化,放入容器中 -->
<contxt:component-scan base-package="com.mecol.community.web"/>
<!-- 启动 mvc 的常用注解 -->
<mvc:annotation-driven/>
<!--将所有的静态资源,交给 Servlet 处理-->
<mvc:default-servlet-handler/>
<!-- 定义Spring MVC的拦截器 -->
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<!--注意是两个** 只有一个*的话
只能拦截http://localhost:8080/admin
这种http://localhost:8080/admin/js 这样的就拦截不了了-->
<!-- 自定义判断用户权限的拦截类 -->
<bean class="com.mecol.community.interceptor.AuthorizedInterceptor"/>
</mvc:interceptor>
</mvc:interceptors>
<!--配置 view 解析器-->
<!-- 页面接受数据 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF" /> <!--那样 代码中就要写全 比如:return "/jsp/admin/editAdmin";-->
<property name="suffix" value=".jsp" />
<property name="order" value="1"/>
</bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mecol.demo</groupId>
<artifactId>ssm_mysql_hotel</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>SSM_demo Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<!-- spring 依赖包 -->
<!-- spring web jar包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.8.RELEASE</version>
</dependency>
<!-- spring aop jar包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>4.3.8.RELEASE</version>
</dependency>
<!-- spring 驱动jar包-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.3.8.RELEASE</version>
</dependency>
<!-- spring mvc 依赖包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>4.3.8.RELEASE</version>
</dependency>
<!-- mybatis 依赖包 -->
<!--mybatis jar包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.6</version>
</dependency>
<!-- mybatis spring-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.2</version>
</dependency>
<!-- 连接数据库驱动的jar包 我这里使用的是 jtds链接sqlserver数据库的驱动包 -->
<dependency>
<groupId>net.sourceforge.jtds</groupId>
<artifactId>jtds</artifactId>
<version>1.2.4</version>
</dependency>
<!-- MySql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
</dependency>
<!-- 连接接池 c3p0 -->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
<!--调试输出的log4j-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- jstl jar包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- jackson begin -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.8</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7</version>
</dependency>
<!--下面两个包 解决采用@ResponseBody 前台ajax请求 报错406-->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.8.5</version>
</dependency>
<!--分页查询的工具-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>4.1.4</version>
</dependency>
<!-- json处理工具包 -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
</dependency>
<!-- 单元测试 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>SSM_demo</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
## Spring的配置文件
- web.xml
```javascript
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Archetype Created Web Application</display-name>
<!--配置 Spring 容器-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring_root.xml</param-value>
</context-param>
<!--中文乱码处理过滤-->
<!-- 编码过滤器 -->
<filter>
<filter-name>characterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Jasperreport Config Begin -->
<servlet>
<servlet-name>JasperImageServlet</servlet-name>
<servlet-class>net.sf.jasperreports.j2ee.servlets.ImageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JasperImageServlet</servlet-name>
<url-pattern>/servlets/image</url-pattern>
</servlet-mapping>
<!-- Jasperreport Config End -->
<!--配置 Spring mvc 容器-->
<!--将所有请求,都交给Spring MVC 处理-->
<servlet>
<servlet-name>webs</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring_web.xml</param-value>
</init-param>
</servlet>
<!--将 请求 截取 转交给 webs -->
<servlet-mapping>
<servlet-name>webs</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
<?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:contxt="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
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/context
http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- 扫描 service 包下面使用@Component/@Service/@Repository/@Controller 注解的类 将其实例化,放入容器中 -->
<contxt:component-scan base-package="com.mecol.hotel.service" />
<!--创建数据源-->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<!-- 数据库驱动 -->
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<!-- 数据库连接 -->
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/hotel?characterEncoding=utf8&useSSL=false&serverTimezone=CTT"/>
<!-- 数据库用户名 -->
<property name="user" value="root"/>
<!-- 数据库密码 -->
<property name="password" value="123489"/>
</bean>
<!-- 配置mybatis -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 数据源的实例化 -->
<property name="dataSource" ref="dataSource"/>
<!-- 映射 DML 语法 只要文件夹变蓝色 就是classpath 所以要有个mapper文件夹 下面所有的.xml都会映射-->
<property name="mapperLocations" value="classpath:mapper/*.xml"/>
<!--加载mybatis自身的配置文件-->
<property name="configLocation" value="classpath:mybatis-config.xml"/>
</bean>
<!-- 映射 数据访问层 ( dao ) 中的接口 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
<property name="basePackage" value="com.mecol.hotel.dao"/>
</bean>
<!-- 文件上传 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 设置上传文件的最大尺寸为10MB -->
<property name="maxUploadSize">
<value>10485760</value>
</property>
<!--设置编码,与jsp页面编码一致-->
<property name="defaultEncoding">
<value>UTF-8</value>
</property>
</bean>
<!-- JDBC事务管理器 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource"/>
<!-- 启用支持annotation注解方式事务管理 -->
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>
<?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:contxt="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p"
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/context
http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- 扫描 service 包下面使用@Component/@Service/@Repository/@Controller 注解的类 将其实例化,放入容器中 -->
<contxt:component-scan base-package="com.mecol.hotel.service" />
<!--创建数据源-->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<!-- 数据库驱动 -->
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<!-- 数据库连接 -->
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/hotel?characterEncoding=utf8&useSSL=false&serverTimezone=CTT"/>
<!-- 数据库用户名 -->
<property name="user" value="root"/>
<!-- 数据库密码 -->
<property name="password" value="123489"/>
</bean>
<!-- 配置mybatis -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 数据源的实例化 -->
<property name="dataSource" ref="dataSource"/>
<!-- 映射 DML 语法 只要文件夹变蓝色 就是classpath 所以要有个mapper文件夹 下面所有的.xml都会映射-->
<property name="mapperLocations" value="classpath:mapper/*.xml"/>
<!--加载mybatis自身的配置文件-->
<property name="configLocation" value="classpath:mybatis-config.xml"/>
</bean>
<!-- 映射 数据访问层 ( dao ) 中的接口 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
<property name="basePackage" value="com.mecol.hotel.dao"/>
</bean>
<!-- 文件上传 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 设置上传文件的最大尺寸为10MB -->
<property name="maxUploadSize">
<value>10485760</value>
</property>
<!--设置编码,与jsp页面编码一致-->
<property name="defaultEncoding">
<value>UTF-8</value>
</property>
</bean>
<!-- JDBC事务管理器 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
p:dataSource-ref="dataSource"/>
<!-- 启用支持annotation注解方式事务管理 -->
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>
https://pan.baidu.com/s/1-iqF7VDMsQ-dBeY-N0mcyw?pwd=4354
提取码:4354
文章浏览阅读3.6k次。一 、安装lc及依赖brew install nodenmp install -g leetcode-cli二、配置及使用配置lc $ cat > ~/.lcconfig{ "LANG": "java", "USE_COLOR": true, "COLOR_THEME": "orange", "AUTO_LOGIN": true, "_leetcode-cli
文章浏览阅读1.8k次。日萌社人工智能AI:Keras PyTorch MXNet TensorFlow PaddlePaddle 深度学习实战(不定时更新)3.4 CNN架构下面我们主要以一些常见的网络结构去解析,并介绍大部分的网络的特点。这里看一下卷积的发展历史图。3.4.1 LeNet-5解析首先我们从一个稍微早一些的卷积网络结构LeNet-5(这里稍微改了下名字),开始的目的是用来识..._vgg16 vgg19 resnet50 以图搜图
文章浏览阅读2.2k次。1、我的为libstdc++.so.6 缺失,需要下载libstdc++.so.6.17下载地址:http://pan.baidu.com/s/1o6YvaS62、进入/usr/lib64将原来的libstdc++.so.6链接删除cd /usr/lib64 rm libstdc++.so.63、替换ln /usr/lib64/libstdc++.so._qt5 .run
文章浏览阅读3.4k次,点赞14次,收藏66次。1,反向传播算法训练步骤总结:1.1步骤:在网络的训练过程中,梯度计算分为前向计算与反向传播 :1)随机初始化权重和偏差;2)在正向传播过程中,输入信息通过输入层经隐含层,逐层处理并传向输出层;3) 如果在输出层得不到期望的输出值,则取输出与期望的误差的平方和作为目标函数,计算输出与期望值之间的误差;4)转入反向传播,逐层求出目标函数对各神经元权值的偏导数,构成目标函数对权值向量的梯量,作为修改权值的依据,对每个产生误差的神经元,调整相应的权重值,以减小误差,网络的学习在权值修改过程中完成。5_模式识别与机器学习
文章浏览阅读57次。Xpath,lxml模块用法转载的原因和前面的一样,我写的没别人写的好,所以我也不浪费时间了,直接转载这位崔庆才大佬的原帖链接:传送门以下为转载内容:---------------------------------------------------------------------------------------------------------------..._洗礼灵魂,修炼python 爬虫 71
文章浏览阅读3.2k次。一个早上读完了《20个月赚130亿-YouTube创始人陈士骏自传》这本书。这本书的书名实在是太俗了,公开场合下还真不太好意思给别人看到这本书的书名,太露骨了。要不是有人推荐,还以为又是成功学之类的书,不过书的内容还不错,详细讲述了Youtube创始人陈士俊的创业史,文笔也算流畅。看完书后,第一感觉就是这家伙怎么这么很幸运,连作者本人在书中多次提到自己的幸运。陈士俊大学没毕业就加入了当时还在初创期
文章浏览阅读1w次,点赞2次,收藏5次。参考链接: http://www.kafan.cn/edu/46040861.html http://yahoon.blog.51cto.com/13184/200991/我想从FTP上把整个项目代码拷贝到windows下,直接用winscp下载,那速度,不说了,找了好久,觉得以下方法还挺好用,就综合了别人的方法(原文在文章开头已标明出处),整理了一下_win10 ftp 下载文件夹
文章浏览阅读468次。安装了anaconda的话,可以非常容易的安装第三方的包,因为它已经帮你安装了pip模块,可以直接pip安装。下面说说我安装第三方包的几个方法。1.conda install 包名2.pip install 包名3.在python官网的pypi里搜索包名,下载到本地,解压后,打开命令行,cd到安装包的文件夹输入python setup.py build输入python setu_python里面下载lll库
文章浏览阅读3.5k次,点赞2次,收藏6次。昨天整理了关于APP微信支付的东西,今天在整理代码之后,来谈谈支付宝的APP支付。两者有很大相似之处,也有区别,只要理解了一个,另一个就很好理解了,如果是第一次做服务端的支付的话,建议先看看上面那篇APP微信支付,我是从微信支付那边过来的,再看支付宝支付,就赶紧很顺利了。闲话少说,开始发招!先看一下开发文档,创建应用:https://docs.open.alipay.com/200/1053..._alipaytradeapppayrequest
文章浏览阅读987次。centos7.5 解决缺少libstdc++.so.6库的原因及解决办法执行node -v报错如下:[root@bogon ~]# node -vnode: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or d..._yum install libstdc++6 no package libstdc++6 available
文章浏览阅读176次。线性表的应用线性表的合并问题描述:假设利用两个线性表LaL_aLa和LbL_bLb分别表示两个集合AAA和BBB,现要求一个新集合A=A∪BA=A∪BA=A∪BLa=(7,5,3,11)L_a=(7,5,3,11)La=(7,5,3,11) Lb=(2,6,5)L_b=(2,6,5)Lb=(2,6,5) −>->−> La=(7,5,3,11,2,6)L_a=(7,5,3,11,2,6)La=(7,5,3,11,2,6)算法步骤依次取出LbL_bLb中的_比较线性表a和线性表b大小
文章浏览阅读3k次,点赞4次,收藏11次。关于网上很少有使用krpano在vue的方法,这里我们会介绍基础的方法和一些配置。(因为自己使用的是破解版,不进行软件的分享,只进行技术分享,博主也仅用作自己实验用途)首先我们需要准备一张图片,然后拖入krpano中的bat:他就会自动转换出一个对应的文件tour,大致配置如下:然后我们在vue项目中创建一个static文件下,再创建一个krpano文件夹专门用于存放我们转换出来的文件:在vue的index.html下引入:(在这里引入主要是为了子页面的embedpano方法)在子页面_vue全景图