Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lakernote
EasyAdmin
提交
054830c4
E
EasyAdmin
项目概览
lakernote
/
EasyAdmin
9 个月 前同步成功
通知
14
Star
3
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
EasyAdmin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
054830c4
编写于
8月 23, 2021
作者:
lakernote
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
(新增)[整体](添加favicon.ico)
上级
ab926872
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
0 deletion
+33
-0
README.md
README.md
+2
-0
pom.xml
pom.xml
+6
-0
src/test/java/com/laker/admin/service/NginxTest.java
src/test/java/com/laker/admin/service/NginxTest.java
+25
-0
未找到文件。
README.md
浏览文件 @
054830c4
...
...
@@ -42,6 +42,8 @@
|
**基于mybatis插件的数据权限控制**
🐾 | ✅ |
[
基于Mybatis-Plus的数据权限实现
](
https://blog.csdn.net/abu935009066/article/details/115481149
)
|
|
**基于SpringTask定时任务(支持动态CRUD任务)**
🐾 | ✅ |
[
基于Spring Task实现动态管理任务
](
https://blog.csdn.net/abu935009066/article/details/116142630
)
|
|
**在线WebLog、动态修改日志级别**
🐾 | ✅ |
[
在线WebLog、动态修改日志级别
](
https://blog.csdn.net/abu935009066/article/details/114121941
)
|
|
**前端路由守卫**
| ❎ | |
|
**前端按钮控制**
| ❎ | |
#### 软件架构
...
...
pom.xml
浏览文件 @
054830c4
...
...
@@ -155,6 +155,12 @@
<artifactId>
ip2region
</artifactId>
<version>
1.7.2
</version>
</dependency>
<!-- nginx配置文件处理 -->
<dependency>
<groupId>
com.github.odiszapc
</groupId>
<artifactId>
nginxparser
</artifactId>
<version>
0.9.6
</version>
</dependency>
</dependencies>
<build>
...
...
src/test/java/com/laker/admin/service/NginxTest.java
0 → 100644
浏览文件 @
054830c4
package
com.laker.admin.service
;
import
com.github.odiszapc.nginxparser.NgxBlock
;
import
com.github.odiszapc.nginxparser.NgxConfig
;
import
com.github.odiszapc.nginxparser.NgxEntry
;
import
com.github.odiszapc.nginxparser.NgxParam
;
import
java.io.IOException
;
import
java.util.List
;
public
class
NginxTest
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
NgxConfig
conf
=
NgxConfig
.
read
(
"/etc/nginx/nginx.conf"
);
NgxParam
workers
=
conf
.
findParam
(
"worker_processes"
);
// Ex.1
workers
.
getValue
();
// "1"
NgxParam
listen
=
conf
.
findParam
(
"http"
,
"server"
,
"listen"
);
// Ex.2
listen
.
getValue
();
// "8889"
List
<
NgxEntry
>
rtmpServers
=
conf
.
findAll
(
NgxConfig
.
BLOCK
,
"rtmp"
,
"server"
);
// Ex.3
for
(
NgxEntry
entry
:
rtmpServers
)
{
((
NgxBlock
)
entry
).
getName
();
// "server"
((
NgxBlock
)
entry
).
findParam
(
"application"
,
"live"
);
// "on" for the first iter, "off" for the second one
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录