管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-24 1b34d78135c4f3168b36931faab8a9faa2c0cbca
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
 
----------------------------------------------------------------------------------------------------
1.修改菜单、数据目录、单位的xls数据,编写递归查询SQL
2.登录时验证使用MD5+Salt密码
3.登录时的用户名和密码使用RSA加密、解密
4.WebSocket服务
5.资源实时监控(CPU信息+内存信息+在线用户+资源状态)
6.新建和修改用户密码时使用MD5加密
7.解决Swagger-UI无法传递Cookie信息
8.验证密码复杂度(8-20位包含字母、数字和特殊字符)
9.使用GDAL读取tif、shp、gdb文件
a.添加Mybatis Plus组件
b.解决表映射出错、根据ID查询失败、分页无效等问题
c.开发地名地址分页查询接口
d.开发上传shp文件读取第一条记录的WKT功能
e.解决上传文件时实体类映射异常
f.后台服务访问添加登录验证拦截器
 
-----------------------------------------------
.开发切面日志功能
.添加数据库监控功能(Druid Monitor)
.下载文件并设置MIME类型
.5分钟内密码错误5次拒绝登录
.Redis服务配置强密码
.添加批量修改用户密码接口
.修改所有的批量新增、删除、修改接口
.开发大文件上传接口
.GDAL读取shp后删除上传文件
 
-----------------------------------------------
1.上传文件(commons-fileupload) *
2.对用户、菜单、角色、资源进行授权
3.添加查询角色、菜单、资源权限接口
4.接口应用菜单权限
 
----------------------------------------------------------------------------------------------------
java 调用gdal读取gdb数据,linux下java调用gdal:
https://blog.csdn.net/weixin_53853459/article/details/120954597
https://blog.csdn.net/qq_43444401/article/details/125649414
https://blog.csdn.net/qq_43961619/article/details/124627871
 
http://127.0.0.1:12316/dict/selectCount?tab=sys_user
http://127.0.0.1:12316/Dict/selectByPage?tab=sys_user&pageSize=10&pageIndex=0
 
http://127.0.0.1:12316/Style/selectCount?name=edp
http://127.0.0.1:12316/Style/selectByPage?name=edp&pageSize=10&pageIndex=0
 
http://127.0.0.1/lf/sg/login.html
http://127.0.0.1:12316/swagger-ui.html
http://192.168.20.106:12316/swagger-ui.html
http://localhost:12316/sign/toIndex
http://localhost:12316/sign/toLogin
http://127.0.0.1:12316/sign/toLogin?service=http://www.sina.com.cn
 
.gdb > HFCP+LRRL + TFCA
.shp  > F5004_WT.shp + F5004_WL.shp + F5004.shp
------------------------------------------------------------------------------- 暂时未对应的Controller
data/DownloadController
data/MetaFileController
sys/AttachController
sys/MsgController
 
----------------------------------------------------------------------------------------------------
java和js实现aes加密解密:
https://blog.csdn.net/weixin_30663839/article/details/114049667
 
http://192.168.20.39:12306/
http://192.168.20.39:12315/
http://192.168.20.39:12316/
----------------------------------------------------------------------------------------------------
String path = System.getProperty("user.dir");
 
String uid = RsaHelper.decrypt(user.getUid());
String pwd = RsaHelper.decrypt(user.getPwd());
 
String p1="Admin@123";
String p2= RsaHelper.encrypt(p1);
String p3= RsaHelper.decrypt(p2);
 
http://192.168.20.39:8088/cas/login,admin/Admin@123,postgres
 
String pwd = "Admin@123";
String md5 = "b37f70636f1164e86cc8796201737933f65af63918d8442b";
boolean f1 = Md5Helper.validatePassword(pwd, md5);
 
String md5Pwd = Md5Helper.reverse(Md5Helper.generate(pwd));
boolean f2 = Md5Helper.validatePassword(pwd, md5Pwd);
 
new String(Base64.getDecoder().decode(username));
 
下载:http://127.0.0.1:12316/style/download?guid=15deb4e6bf02db827e39521758520fd5
 
使用Commons FileUpLoad 文件上传功能:
https://www.itdaan.com/blog/2017/08/08/b2dbc1106fa7.html
----------------------------------------------------------------------------------------------------
一、开发运行环境
JDK版本:1.8
maven版本:3.5
文件编码:UTF-8
 
二、技术框架说明
    总体采用了前后端分离的技术方案,后台提供REST服务,前端使用MVVM框架做用户交互。
    前后端可并行独立开发。
----------------------------------------------------------------------------------------------------
服务端:
  核心框架:SpringBoot
  持久层框架:Mybatis
  安全框架:Shiro
  缓存:redis
 
前端:
  JS框架:vue.js
  主页框架:adminLTE(基于Bootstrap)
  表格插件:jqGrid
  树形表格:tree-table
  树形插件:ztree
  弹窗组件:layer
  表单校验:validator
 
private static final String SQLSERVER_URL = "jdbc:sqlserver://192.168.0.77\\ZKZS;databaseName=xian";
----------------------------------------------------------------------------------------------------
{
  "id": 2,
  "pwd": "000000",
  "salt": "Admin@123"
}
 
// 获取请求方式: GET
String getMethod()
 
// 获取虚拟目录(上下文目录):虚拟路径通过在application配置当中可以配置
// 配置:server.servlet.context-path=/aaa
String getContextPath()
 
// 获取Servlet路径:就是获取的controller当中配置的路径
String getServletPath()
 
/// 获取请求参数: id=3
// http://localhost:8080/aaa/test?id=3
String getQueryString()
 
// 获取请求URI:/servletDemo/demo1
// 上下文路径+controller当中配置的路径
String getRequestURI()
 
// 获取完整请求路径:http://localhost:8080/aaa/test
String getRequestURL()
 
// 获取协议及版本:HTTP/1.1
String getProtocol()
 
// 获取客户机的IP地址:192.168.0.0
String getRemoteAddr()
 
// 获取请求头数据,通过请求头名称获取值
String getHeader(String name)
 
// 获取所有请求头信息
Enumeration<String> getHeaderNames()
 
// 获取流对象-获取字符输入流,只能操作字符数据
BufferedReader getReader()
 
// 获取流对象-获取字节输入流,既能操作字节也能操作字符
ServletInputStream getInputStream()
 
// 获取请求参数通用方式(根据参数名称获取参数值) username=zhangsan
String getParameter(String name)
 
// 获取请求参数名称获取参数值的数组 hobby=xx&hobby=game
String[] getParameters(String name)
 
// 获取请求参数名称(与获取请求头方法类似)
Enumeration<String> getParameterNames()
 
// 获取所有参数的Map集合
Map<String,String> getParameterMap()
 
request.setCharacterEncoding("UTF-8");
 
// 通过request对象获取请求转发服务器:
RequestDispatcher getRequestDispatcher(String path);
 
// 使用==RequestDispatcher对象来进行转发
forward(ServlertRequest request,ServletResponse response);
 
//设置状态码
response.setStatus(304);
 
// 设置指定名称响应头的值,下面是导出的时候我们经常要设置的响应头,响应头当中还有文件的名称,也就是通过流下载文件的时候那个文件名称
response.setHeader("Content-Disposition", "attachment;filename=" + zipName);
 
// 1.字符输出流
PrintWriter getWriter()
 
// 2.字节输出流(一般导出就是将文件写到字节流,然后响应response)
ServletOutputStream getOutputStream()
 
// 注意:在同一个Servlet,二种输出流不能同时使用,产生互斥
// response提供了专门负责重定向的方法
response.sendRedirect("/项目地址/资源地址");
 
// 指定服务器响应中文的编码方式
response.setCharacterEncoding("GBK");
 
// 统一服务器和客户端的编码方式
response.setContentType("text/html;charset=utf-8");
 
// 导出的时候如果需要直接通过response流导出Excel,需要和前端设置上下文类型,如下:
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
----------------------------------------------------------------------------------------------------