jeecmsv8.1怎么修改项目后台访问地址
将jeeadmin/jeecms/index.do 改为admin/index.do为例
1.修改WebContent\WEB-INF\web.xml
<servlet-mapping>
<servlet-name>JeeCmsAdmin</servlet-name>
<url-pattern>/jeeadmin/jeecms/*</url-pattern>
</servlet-mapping>
改为
<servlet-mapping>
<servlet-name>JeeCmsAdmin</servlet-name>
<url-pattern>/admin/*</url-pattern>
</servlet-mapping>
2.修改WebContent\WEB-INF\config\jeecms-servlet-admin.xml
<entry key="appBase" value="/jeeadmin/jeecms"/>
改为
<entry key="appBase" value="/admin"/>
3.修改WebContent\WEB-INF\config\shiro-context.xml
把
*.jspx = anon
*.jhtml = anon
/member/forgot_password.jspx = anon
/member/password_reset.jspx = anon
/login.jspx = authc
/logout.jspx = logout
/member/** = user
/jeeadmin/jeecms/login.do = authc
/jeeadmin/jeecms/logout.do = logout
/jeeadmin/jeecms/** =user
改为
*.jspx = anon
*.jhtml = anon
/member/forgot_password.jspx = anon
/member/password_reset.jspx = anon
/login.jspx = authc
/logout.jspx = logout
/member/** = user
/admin/login.do = authc
/admin/logout.do = logout
/admin/** =user
把
<property name="adminLogin" value="/jeeadmin/jeecms/login.do"/>
<property name="adminPrefix" value="/jeeadmin/jeecms/"/>
改为
<property name="adminLogin" value="/admin/login.do"/>
<property name="adminPrefix" value="/admin/"/>
把
<property name="adminIndex" value="/jeeadmin/jeecms/index.do"/>
改为
<property name="adminIndex" value="/admin/index.do"/>
3.修改\src\com\jeecms\cms\web\AdminContextInterceptor.java
把private static String getURI(HttpServletRequest request) throws IllegalStateException {
UrlPathHelper helper = new UrlPathHelper();
String uri = helper.getOriginatingRequestUri(request);
String ctxPath = helper.getOriginatingContextPath(request);
int start = 0, i = 0, count = 2
if (!StringUtils.isBlank(ctxPath)) {
count++;
}
while (i < count && start != -1) {
start = uri.indexOf('/', start + 1);
i++;
}
if (start <= 0) {
throw new IllegalStateException("admin access path not like '/jeeadmin/jeecms/...' pattern: "
+ uri);
}
return uri.substring(start);
}
改为
private static String getURI(HttpServletRequest request) throws IllegalStateException {
UrlPathHelper helper = new UrlPathHelper();
String uri = helper.getOriginatingRequestUri(request);
String ctxPath = helper.getOriginatingContextPath(request);
// int start = 0, i = 0, count = 2;修改
int start = 0, i = 0, count = 1;
if (!StringUtils.isBlank(ctxPath)) {
count++;
}
while (i < count && start != -1) {
start = uri.indexOf('/', start + 1);
i++;
}
if (start <= 0) {
throw new IllegalStateException("admin access path not like '/admin/...' pattern: "
+ uri);
}
return uri.substring(start);
}
最新文章
- 今天学了递归,感觉好复杂啊/(ㄒoㄒ)/~~
- 旅图beta版 asp.net web api 单元测试
- 5、清理mac缓存和关闭后台运行程序
- 循环嵌套,while循环,穷举迭代循环
- leetcode:Implement Stack using Queues 与 Implement Queue using Stacks
- MySQL数据库还原:路径必须用正斜杠?
- jdbc连接池中c3p0的配置文件的详解以及在在java中如何使用
- 并发视频,怎么hold住高并发
- AfxMessageBox和MessageBox差别
- root用户安装的软件在普通用户不生效
- leaflet地图在选项卡中不正常显示
- iOS 11: CORE ML—浅析
- DirectX11--实现一个3D魔方(1)
- Bugku-CTF之never give up
- mail 发送email
- Pandas的使用(3)---Pandas的数据结构
- 负载均衡(Load Balancing)学习笔记(二)
- 【EXCEL】指定の項目の内容一覧を表示
- PHP中var_dump
- CS231n课程笔记翻译3:线性分类笔记