Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Evan Liu
hms
提交
c1da84ad
H
hms
项目概览
Evan Liu
/
hms
通知
10
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hms
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c1da84ad
编写于
8月 12, 2021
作者:
刘
刘兴
提交者:
Gitee
8月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
删除文件 HMS/target
上级
eda93f0e
变更
20
展开全部
隐藏空白更改
内联
并排
Showing
20 changed file
with
0 addition
and
474 deletion
+0
-474
HMS/target/HMS/META-INF/MANIFEST.MF
HMS/target/HMS/META-INF/MANIFEST.MF
+0
-5
HMS/target/HMS/WEB-INF/classes/applicationContext.xml
HMS/target/HMS/WEB-INF/classes/applicationContext.xml
+0
-56
HMS/target/HMS/WEB-INF/classes/jdbc.properties
HMS/target/HMS/WEB-INF/classes/jdbc.properties
+0
-5
HMS/target/HMS/WEB-INF/classes/log4j.properties
HMS/target/HMS/WEB-INF/classes/log4j.properties
+0
-23
HMS/target/HMS/WEB-INF/classes/mapper/userDaoMapper.xml
HMS/target/HMS/WEB-INF/classes/mapper/userDaoMapper.xml
+0
-12
HMS/target/HMS/WEB-INF/classes/mybatis-config.xml
HMS/target/HMS/WEB-INF/classes/mybatis-config.xml
+0
-12
HMS/target/HMS/WEB-INF/classes/spring-mvc.xml
HMS/target/HMS/WEB-INF/classes/spring-mvc.xml
+0
-37
HMS/target/HMS/WEB-INF/classes/spring-shiro.xml
HMS/target/HMS/WEB-INF/classes/spring-shiro.xml
+0
-47
HMS/target/HMS/WEB-INF/jsp/success.jsp
HMS/target/HMS/WEB-INF/jsp/success.jsp
+0
-16
HMS/target/HMS/WEB-INF/web.xml
HMS/target/HMS/WEB-INF/web.xml
+0
-60
HMS/target/HMS/index.jsp
HMS/target/HMS/index.jsp
+0
-5
HMS/target/HMS/static/images/c.jpg
HMS/target/HMS/static/images/c.jpg
+0
-0
HMS/target/HMS/static/js/jquery-3.1.1.min.js
HMS/target/HMS/static/js/jquery-3.1.1.min.js
+0
-4
HMS/target/classes/applicationContext.xml
HMS/target/classes/applicationContext.xml
+0
-56
HMS/target/classes/jdbc.properties
HMS/target/classes/jdbc.properties
+0
-5
HMS/target/classes/log4j.properties
HMS/target/classes/log4j.properties
+0
-23
HMS/target/classes/mapper/userDaoMapper.xml
HMS/target/classes/mapper/userDaoMapper.xml
+0
-12
HMS/target/classes/mybatis-config.xml
HMS/target/classes/mybatis-config.xml
+0
-12
HMS/target/classes/spring-mvc.xml
HMS/target/classes/spring-mvc.xml
+0
-37
HMS/target/classes/spring-shiro.xml
HMS/target/classes/spring-shiro.xml
+0
-47
未找到文件。
HMS/target/HMS/META-INF/MANIFEST.MF
已删除
100644 → 0
浏览文件 @
eda93f0e
Manifest-Version: 1.0
Created-By: IntelliJ IDEA
Built-By: 14353
Build-Jdk: version 1.8.0_162
HMS/target/HMS/WEB-INF/classes/applicationContext.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?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"
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"
>
<!--指定要扫描的包 指定包下的注解才会生效-->
<context:component-scan
base-package=
"com.hqyj.seven"
>
<context:exclude-filter
type=
"annotation"
expression=
"org.springframework.stereotype.Controller"
/>
</context:component-scan>
<!-- 引用spring-shiro.xml配置文件-->
<import
resource=
"classpath:spring-shiro.xml"
/>
<!--开启注解支持-->
<context:annotation-config/>
<!--使用properties holder 加载properties-->
<bean
id=
"placeholderConfigurer"
class=
"org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"
>
<property
name=
"location"
value=
"classpath:jdbc.properties"
/>
</bean>
<!--配置数据源-->
<bean
id=
"dataSource"
class=
"org.apache.commons.dbcp.BasicDataSource"
>
<property
name=
"driverClassName"
value=
"${driver}"
/>
<property
name=
"url"
value=
"${url}"
/>
<property
name=
"username"
value=
"${username}"
/>
<property
name=
"password"
value=
"${password}"
/>
</bean>
<!--mybatis整合spring框架-->
<bean
id=
"sqlSessionFactoryBean"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!--配置数据源-->
<property
name=
"dataSource"
ref=
"dataSource"
/>
<!--配置mybatis映射文件所在位置-->
<property
name=
"mapperLocations"
value=
"classpath:mapper/*.xml"
/>
<!--配置mybatis配置所在位置-->
<property
name=
"configLocation"
value=
"classpath:mybatis-config.xml"
/>
<!--配置mybatis分页插件-->
<property
name=
"plugins"
>
<array>
<bean
class=
"com.github.pagehelper.PageInterceptor"
/>
</array>
</property>
</bean>
<!--配置所有mybatis生成的代理dao对象的类型所在包,以便spring IOC容器创建这些dao代理对象-->
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"basePackage"
value=
"com.hqyj.seven.dao"
/>
<!--配置上面配置的sqlSessionFactoryBean的名字 即bean id-->
<property
name=
"sqlSessionFactoryBeanName"
value=
"sqlSessionFactoryBean"
/>
</bean>
</beans>
\ No newline at end of file
HMS/target/HMS/WEB-INF/classes/jdbc.properties
已删除
100644 → 0
浏览文件 @
eda93f0e
driver
=
com.mysql.cj.jdbc.Driver
url
=
jdbc:mysql://127.0.0.1:3306/hms?useAffectedRows=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username
=
root
//测试时把密码改成自己的密码,提交时候改成123456
password
=
123
\ No newline at end of file
HMS/target/HMS/WEB-INF/classes/log4j.properties
已删除
100644 → 0
浏览文件 @
eda93f0e
#如果要输出到文件,下面一行后面增加一个,File
log4j.rootLogger
=
DEBUG, Console
#配置输出log到文件
#文件大小到达指定尺寸的时候产生一个新的文件
log4j.appender.File
=
org.apache.log4j.RollingFileAppender
#指定输出目录
log4j.appender.File.File
=
logs/ssm.log
#定义文件最大大小
log4j.appender.File.MaxFileSize
=
10MB
# 输出所以日志,如果换成DEBUG表示输出DEBUG以上级别日志
log4j.appender.File.Threshold
=
ALL
log4j.appender.File.layout
=
org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern
=
[%p] [%d{yyyy-MM-dd HH
\:
mm
\:
ss}][%c]%m%n
#配置输出到Console
log4j.appender.Console
=
org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout
=
org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern
=
[%p][%c] - %m%n
# spring框架和apache的包输出日志级别为INFO
log4j.logger.org.springframework
=
INFO
log4j.logger.org.apache
=
INFO
\ No newline at end of file
HMS/target/HMS/WEB-INF/classes/mapper/userDaoMapper.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--对某个Java接口文件进行描述,两者之间的关系一一对应-->
<!--namespace属性指定对应的java接口文件,全类名-->
<mapper
namespace=
"com.hqyj.seven.dao.UserDao"
>
<select
id=
"queryByUsername"
resultType=
"com.hqyj.seven.pojo.User"
useCache=
"true"
>
select * from user where name=#{name}
</select>
</mapper>
\ No newline at end of file
HMS/target/HMS/WEB-INF/classes/mybatis-config.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!--打开mybatis缓存-->
<settings>
<setting
name=
"cacheEnabled"
value=
"true"
/>
</settings>
</configuration>
\ No newline at end of file
HMS/target/HMS/WEB-INF/classes/spring-mvc.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?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: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
https://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
https://www.springframework.org/schema/mvc/spring-mvc.xsd"
>
<!--组件扫描-->
<context:component-scan
base-package=
"com.hqyj.seven.controller"
/>
<!--配置springmvc的视图资源解析器-->
<bean
id=
"resourceViewResolver"
class=
"org.springframework.web.servlet.view.InternalResourceViewResolver"
>
<!--将控制器中返回的字符串进行拼接前缀部分+返回字符串+后缀部门
形成一个完整的jsp视图资源地址-->
<property
name=
"prefix"
value=
"/WEB-INF/jsp/"
/>
<property
name=
"suffix"
value=
".jsp"
/>
</bean>
<!--注解驱动,让springmvc框架解析定义的注解-->
<mvc:annotation-driven/>
<!--Spring MVC 静态资源配置-->
<mvc:resources
mapping=
"/js/**"
location=
"/static/js/"
/>
<mvc:resources
mapping=
"/images/**"
location=
"/static/images/"
/>
<mvc:resources
mapping=
"/css/**"
location=
"/static/css/"
/>
<!--处理文件上传-->
<!-- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">-->
<!-- <!–文件上传的大小限制–>-->
<!-- <property name="maxInMemorySize" value="5000000"/>-->
<!-- </bean>-->
</beans>
\ No newline at end of file
HMS/target/HMS/WEB-INF/classes/spring-shiro.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<bean
id=
"credentialsMatcher"
class=
"org.apache.shiro.authc.credential.HashedCredentialsMatcher"
>
<!-- 这里配置的算法和迭代此地,和MD5Util是一致的-->
<property
name=
"hashAlgorithmName"
value=
"MD5"
></property>
<property
name=
"hashIterations"
value=
"1000"
></property>
</bean>
<!-- MyShiroRealm bean 配置-->
<bean
id=
"myShiroRealm"
class=
"com.hqyj.seven.realm.MyShiroRealm"
>
<!-- <property name="credentialsMatcher" ref="credentialsMatcher"></property>-->
</bean>
<!-- 配置shiro核心组件 SecurityManager -->
<bean
id=
"securityManager"
class=
"org.apache.shiro.web.mgt.DefaultWebSecurityManager"
>
<!-- 我们自定义的认证域对象注入到SecurityManager对象中-->
<property
name=
"realm"
ref=
"myShiroRealm"
/>
</bean>
<!-- shiro过滤器,用于授权 -->
<!-- 这里的id shiroFilter 和web.xml中配置的代理过滤器的名称一致-->
<!-- 当已经认证的用户访问系统资源时,检查所具有的权限 如果有访问权限
授权通过,允许访问吧,反之,拒绝访问
web应用收权限-->
<bean
id=
"shiroFilter"
class=
"org.apache.shiro.spring.web.ShiroFilterFactoryBean"
>
<property
name=
"securityManager"
ref=
"securityManager"
/>
<!-- 没有认证过的用户,访问受限资源时,shiro直接跳转该配置的url-->
<property
name=
"loginUrl"
value=
"/index.jsp"
></property>
<!-- 已认证过但是没有访问权限的用户 访问受限资源时 shiro直接跳转到该处置的url-->
<property
name=
"unauthorizedUrl"
value=
"/unauthorized.jsp"
></property>
<property
name=
"filterChainDefinitions"
>
<value>
<!-- 配置过滤器链
想要控制url=身份信息:anon 匿名用户
authc 认证通过用户
roles[角色名]具有某个角色的用户
permes[权限名]具有某个权限的用户-->
/shiroTag=anon
/index.jsp=anon
/user/login=anon
/shiro/mustauthc=authc
/shiro/mustauthc=roles[管理员]
/shiro/mustnormal=roles[普通用户]
/**=authc
</value>
</property>
</bean>
</beans>
\ No newline at end of file
HMS/target/HMS/WEB-INF/jsp/success.jsp
已删除
100644 → 0
浏览文件 @
eda93f0e
<%--
Created by IntelliJ IDEA.
User: 14353
Date: 2021/8/11
Time: 20:16
To change this template use File | Settings | File Templates.
--%>
<%@ page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%>
<html>
<head>
<title>
Title
</title>
</head>
<body>
登录成功
</body>
</html>
HMS/target/HMS/WEB-INF/web.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns=
"http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version=
"4.0"
>
<!-- <display-name>Archetype Created Web Application</display-name>-->
<!-- 监听应用的启动和销毁-->
<!-- 应用域的初始化参数,名值对-->
<context-param>
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath:applicationContext.xml
</param-value>
</context-param>
<!-- 这里配置listener监听web服务器启动我们的应用,spring IOC容器将在此时创建-->
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>
dispatcherServlet
</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<init-param>
<!-- dispatcherServlet加载springIOC容器-->
<param-name>
contextConfigLocation
</param-name>
<param-value>
classpath:spring-mvc.xml
</param-value>
</init-param>
<!-- 1意味着web容器加载时,即加载dispatcherServlet-->
<load-on-startup>
1
</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>
dispatcherServlet
</servlet-name>
<!-- / 表明该DispatcherServlet拦截所有的url,除了.jsp结尾的
如果配置为/* 拦截所有的url,包括.jsp-->
<url-pattern>
/
</url-pattern>
</servlet-mapping>
<!-- 解决中文乱码问题-->
<filter>
<filter-name>
encodingFilter
</filter-name>
<filter-class>
org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
<!-- encoding参数名固定的,值配置为编码格式-->
<param-name>
encoding
</param-name>
<param-value>
utf-8
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>
encodingFilter
</filter-name>
<!-- 对所有的url进行过滤 -->
<url-pattern>
/*
</url-pattern>
</filter-mapping>
<!-- 配置shiro的过滤器 (的代理)
代理的是IOC容器具有过滤功能的bean
过滤器的名称为 IOC容器中具有过滤功能的bean的id-->
<filter>
<filter-name>
shiroFilter
</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
</filter>
<filter-mapping>
<filter-name>
shiroFilter
</filter-name>
<url-pattern>
/*
</url-pattern>
</filter-mapping>
</web-app>
HMS/target/HMS/index.jsp
已删除
100644 → 0
浏览文件 @
eda93f0e
<html>
<body>
<h2>
Hello World!
</h2>
</body>
</html>
HMS/target/HMS/static/images/c.jpg
已删除
100644 → 0
浏览文件 @
eda93f0e
66.2 KB
HMS/target/HMS/static/js/jquery-3.1.1.min.js
已删除
100644 → 0
浏览文件 @
eda93f0e
此差异已折叠。
点击以展开。
HMS/target/classes/applicationContext.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?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"
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"
>
<!--指定要扫描的包 指定包下的注解才会生效-->
<context:component-scan
base-package=
"com.hqyj.seven"
>
<context:exclude-filter
type=
"annotation"
expression=
"org.springframework.stereotype.Controller"
/>
</context:component-scan>
<!-- 引用spring-shiro.xml配置文件-->
<import
resource=
"classpath:spring-shiro.xml"
/>
<!--开启注解支持-->
<context:annotation-config/>
<!--使用properties holder 加载properties-->
<bean
id=
"placeholderConfigurer"
class=
"org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"
>
<property
name=
"location"
value=
"classpath:jdbc.properties"
/>
</bean>
<!--配置数据源-->
<bean
id=
"dataSource"
class=
"org.apache.commons.dbcp.BasicDataSource"
>
<property
name=
"driverClassName"
value=
"${driver}"
/>
<property
name=
"url"
value=
"${url}"
/>
<property
name=
"username"
value=
"${username}"
/>
<property
name=
"password"
value=
"${password}"
/>
</bean>
<!--mybatis整合spring框架-->
<bean
id=
"sqlSessionFactoryBean"
class=
"org.mybatis.spring.SqlSessionFactoryBean"
>
<!--配置数据源-->
<property
name=
"dataSource"
ref=
"dataSource"
/>
<!--配置mybatis映射文件所在位置-->
<property
name=
"mapperLocations"
value=
"classpath:mapper/*.xml"
/>
<!--配置mybatis配置所在位置-->
<property
name=
"configLocation"
value=
"classpath:mybatis-config.xml"
/>
<!--配置mybatis分页插件-->
<property
name=
"plugins"
>
<array>
<bean
class=
"com.github.pagehelper.PageInterceptor"
/>
</array>
</property>
</bean>
<!--配置所有mybatis生成的代理dao对象的类型所在包,以便spring IOC容器创建这些dao代理对象-->
<bean
class=
"org.mybatis.spring.mapper.MapperScannerConfigurer"
>
<property
name=
"basePackage"
value=
"com.hqyj.seven.dao"
/>
<!--配置上面配置的sqlSessionFactoryBean的名字 即bean id-->
<property
name=
"sqlSessionFactoryBeanName"
value=
"sqlSessionFactoryBean"
/>
</bean>
</beans>
\ No newline at end of file
HMS/target/classes/jdbc.properties
已删除
100644 → 0
浏览文件 @
eda93f0e
driver
=
com.mysql.cj.jdbc.Driver
url
=
jdbc:mysql://127.0.0.1:3306/hms?useAffectedRows=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username
=
root
//测试时把密码改成自己的密码,提交时候改成123456
password
=
123
\ No newline at end of file
HMS/target/classes/log4j.properties
已删除
100644 → 0
浏览文件 @
eda93f0e
#如果要输出到文件,下面一行后面增加一个,File
log4j.rootLogger
=
DEBUG, Console
#配置输出log到文件
#文件大小到达指定尺寸的时候产生一个新的文件
log4j.appender.File
=
org.apache.log4j.RollingFileAppender
#指定输出目录
log4j.appender.File.File
=
logs/ssm.log
#定义文件最大大小
log4j.appender.File.MaxFileSize
=
10MB
# 输出所以日志,如果换成DEBUG表示输出DEBUG以上级别日志
log4j.appender.File.Threshold
=
ALL
log4j.appender.File.layout
=
org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern
=
[%p] [%d{yyyy-MM-dd HH
\:
mm
\:
ss}][%c]%m%n
#配置输出到Console
log4j.appender.Console
=
org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout
=
org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern
=
[%p][%c] - %m%n
# spring框架和apache的包输出日志级别为INFO
log4j.logger.org.springframework
=
INFO
log4j.logger.org.apache
=
INFO
\ No newline at end of file
HMS/target/classes/mapper/userDaoMapper.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--对某个Java接口文件进行描述,两者之间的关系一一对应-->
<!--namespace属性指定对应的java接口文件,全类名-->
<mapper
namespace=
"com.hqyj.seven.dao.UserDao"
>
<select
id=
"queryByUsername"
resultType=
"com.hqyj.seven.pojo.User"
useCache=
"true"
>
select * from user where name=#{name}
</select>
</mapper>
\ No newline at end of file
HMS/target/classes/mybatis-config.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!--打开mybatis缓存-->
<settings>
<setting
name=
"cacheEnabled"
value=
"true"
/>
</settings>
</configuration>
\ No newline at end of file
HMS/target/classes/spring-mvc.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?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: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
https://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
https://www.springframework.org/schema/mvc/spring-mvc.xsd"
>
<!--组件扫描-->
<context:component-scan
base-package=
"com.hqyj.seven.controller"
/>
<!--配置springmvc的视图资源解析器-->
<bean
id=
"resourceViewResolver"
class=
"org.springframework.web.servlet.view.InternalResourceViewResolver"
>
<!--将控制器中返回的字符串进行拼接前缀部分+返回字符串+后缀部门
形成一个完整的jsp视图资源地址-->
<property
name=
"prefix"
value=
"/WEB-INF/jsp/"
/>
<property
name=
"suffix"
value=
".jsp"
/>
</bean>
<!--注解驱动,让springmvc框架解析定义的注解-->
<mvc:annotation-driven/>
<!--Spring MVC 静态资源配置-->
<mvc:resources
mapping=
"/js/**"
location=
"/static/js/"
/>
<mvc:resources
mapping=
"/images/**"
location=
"/static/images/"
/>
<mvc:resources
mapping=
"/css/**"
location=
"/static/css/"
/>
<!--处理文件上传-->
<!-- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">-->
<!-- <!–文件上传的大小限制–>-->
<!-- <property name="maxInMemorySize" value="5000000"/>-->
<!-- </bean>-->
</beans>
\ No newline at end of file
HMS/target/classes/spring-shiro.xml
已删除
100644 → 0
浏览文件 @
eda93f0e
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
>
<bean
id=
"credentialsMatcher"
class=
"org.apache.shiro.authc.credential.HashedCredentialsMatcher"
>
<!-- 这里配置的算法和迭代此地,和MD5Util是一致的-->
<property
name=
"hashAlgorithmName"
value=
"MD5"
></property>
<property
name=
"hashIterations"
value=
"1000"
></property>
</bean>
<!-- MyShiroRealm bean 配置-->
<bean
id=
"myShiroRealm"
class=
"com.hqyj.seven.realm.MyShiroRealm"
>
<!-- <property name="credentialsMatcher" ref="credentialsMatcher"></property>-->
</bean>
<!-- 配置shiro核心组件 SecurityManager -->
<bean
id=
"securityManager"
class=
"org.apache.shiro.web.mgt.DefaultWebSecurityManager"
>
<!-- 我们自定义的认证域对象注入到SecurityManager对象中-->
<property
name=
"realm"
ref=
"myShiroRealm"
/>
</bean>
<!-- shiro过滤器,用于授权 -->
<!-- 这里的id shiroFilter 和web.xml中配置的代理过滤器的名称一致-->
<!-- 当已经认证的用户访问系统资源时,检查所具有的权限 如果有访问权限
授权通过,允许访问吧,反之,拒绝访问
web应用收权限-->
<bean
id=
"shiroFilter"
class=
"org.apache.shiro.spring.web.ShiroFilterFactoryBean"
>
<property
name=
"securityManager"
ref=
"securityManager"
/>
<!-- 没有认证过的用户,访问受限资源时,shiro直接跳转该配置的url-->
<property
name=
"loginUrl"
value=
"/index.jsp"
></property>
<!-- 已认证过但是没有访问权限的用户 访问受限资源时 shiro直接跳转到该处置的url-->
<property
name=
"unauthorizedUrl"
value=
"/unauthorized.jsp"
></property>
<property
name=
"filterChainDefinitions"
>
<value>
<!-- 配置过滤器链
想要控制url=身份信息:anon 匿名用户
authc 认证通过用户
roles[角色名]具有某个角色的用户
permes[权限名]具有某个权限的用户-->
/shiroTag=anon
/index.jsp=anon
/user/login=anon
/shiro/mustauthc=authc
/shiro/mustauthc=roles[管理员]
/shiro/mustnormal=roles[普通用户]
/**=authc
</value>
</property>
</bean>
</beans>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录