Galaxy框架设置页面/后台白名单

在软件开发过程当中,PC端作为管理系统,大部分需要登录验证,以保证数据安全。

但是有些时候,移动端也需要一些的网页展示,但是又没有必要做一个新的系统出来,这个时候,我们就可以在PC的前台设计一些移动端页面,并在框架中设置白名单,这样就可以绕过登录验证,用作展示使用,不过个人不清楚这样会不会产生系统漏洞,待测试。

前端设置

在src/const/website.js中,whiteList和whiteTagList中添加网页链接。

image

在src/router/page/index.js中,添加对应网页的链接。

image

正常情况下,网页vue,js和css都是写在views文件夹下的,这里可能是框架考虑到了会有这方面的需求,所以有一个page文件夹,是用来存放类似白名单的网页的,如404的界面,登陆界面等。

image

后端设置

在main/java/包名/security/config/ResourceServerConfiguration.java中,将antMatchers()中添加后端接口的路径即可。

备注

我所说的是基于Galaxy框架的白名单配置过程,大致原理类似,需要具体情况具体分析。

转载于:https://www.cnblogs.com/XYYCKL/p/10885888.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
galaxy 起源于07年的一个数据库导库项目,做一个增删改查的功能,只要几行代码就可以了,只要你会简单的sql语句,就能快速完成一个 功能,相比struts2和spring,着实方便多了. 如果觉得好用,就放弃ssh吧,加入到galaxy的阵营。 1. 完成一个用户管理功能? user.jsp ,这个页面用于新增,修改一个用户 <html> <head></head> <body> <% MyHashMap req = RequestUtil.getRequest(request); MyHashMap obj = new Query("select * from user where id ="+req.getInt("id")); %> <form action="regesiterAction.jsp" method="post"> 用户名<input name="username" value="<%=obj.getString("username")%>" /> 密码<input type="password" value="<%=obj.getString("password")%>" name="password" /> 手机号: <input name="telphone" value="<%=obj.getString("username")%>" /> <input type="hidden" name="action" value="saveorupdate" /> <input type="submit" value="提交" /> </form> </body> </html> userAction.jsp <% MyHashMap req = RequestUtil.getRequest(request); if(req.getString("action").equals("saveorupdate")){ new Imp().saveOrUpdate(req); }else if(req.getString("action").equals("del")){ new Query().update("delete from user where id="+req.getString("id")); } response.sendRededict("user.jsp"); %> 用户列表页面 <html> <body> <form> <table> <tr><td>用户名</td><td>密码</td><td>手机号</td> <% MyHashMap req = RequestUtil.getReq(request); int pagesize = req.getInt("pagesize",10); int pageindex = req.getInt("pageindex",1); List<MyHashMap> list = new Query().getByPaging("select * from user where "+condition,pagesize,pageindex); MyHashMap pageinfo = list.get(0); for(MyHashMap map:list){ %> <tr> <td><%=map.getString("username")%></td> <td><%=map.getString("password")%></td> <td><%=map.getString("telphone")%></td> </tr> <%}%> </table> <%=com.zxhy.fxpt.common.util.StringUtil.getdaohang(pageinfo.getInt("pagecount"),pageinfo.getInt("pagenum"))%> </form> </body> </html> 有兴趣的话,跟我联系qq: 376860997
galaxy 起源于07年的一个数据库导库项目,做一个增删改查的功能,只要几行代码就可以了,只要你会简单的sql语句,就能快速完成一个 功能,相比struts2和spring,着实方便多了. 如果觉得好用,就放弃ssh吧,加入到galaxy的阵营。 1. 完成一个用户管理功能? user.jsp ,这个页面用于新增,修改一个用户 <html> <head></head> <body> <% MyHashMap req = RequestUtil.getRequest(request); MyHashMap obj = new Query("select * from user where id ="+req.getInt("id")); %> <form action="regesiterAction.jsp" method="post"> 用户名<input name="username" value="<%=obj.getString("username")%>" /> 密码<input type="password" value="<%=obj.getString("password")%>" name="password" /> 手机号: <input name="telphone" value="<%=obj.getString("username")%>" /> <input type="hidden" name="action" value="saveorupdate" /> <input type="submit" value="提交" /> </form> </body> </html> userAction.jsp <% MyHashMap req = RequestUtil.getRequest(request); if(req.getString("action").equals("saveorupdate")){ new Imp().saveOrUpdate(req); }else if(req.getString("action").equals("del")){ new Query().update("delete from user where id="+req.getString("id")); } response.sendRededict("user.jsp"); %> 用户列表页面 <html> <body> <form> <table> <tr><td>用户名</td><td>密码</td><td>手机号</td> <% MyHashMap req = RequestUtil.getReq(request); int pagesize = req.getInt("pagesize",10); int pageindex = req.getInt("pageindex",1); List<MyHashMap> list = new Query().getByPaging("select * from user where "+condition,pagesize,pageindex); MyHashMap pageinfo = list.get(0); for(MyHashMap map:list){ %> <tr> <td><%=map.getString("username")%></td> <td><%=map.getString("password")%></td> <td><%=map.getString("telphone")%></td> </tr> <%}%> </table> <%=com.zxhy.fxpt.common.util.StringUtil.getdaohang(pageinfo.getInt("pagecount"),pageinfo.getInt("pagenum"))%> </form> </body> </html> 有兴趣的话,跟我联系qq: 376860997

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值