提交 054830c4 编写于 作者: lakernote's avatar lakernote

(新增)[整体](添加favicon.ico)

上级 ab926872
......@@ -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) |
| **前端路由守卫** | ❎ | |
| **前端按钮控制** | ❎ | |
#### 软件架构
......
......@@ -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>
......
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.
先完成此消息的编辑!
想要评论请 注册