当前位置:网站首页>Roperties class configuration file & DOS to view the host network situation
Roperties class configuration file & DOS to view the host network situation
2022-07-30 03:57:00 【Zinksl】
Article table of contents

Introduction
Hello everyone, I am: a pine
Seriously share technology and record learning bits
If sharing is useful to you, please support me
Like: Comment: Favorite: ️
Personal motto: Ideas are implementedThe best time is now!
1 Properties class is very convenient to operate .properties configuration file
1.1 Properties common methods
method name | Description |
---|---|
load | Load key-value pairs from the configuration file into the Properties object |
list | Display data to the specified device |
getProperties(key) | Get value by key |
setProperties(key,value) | Set key-value pair to Properties object |
store | Store the key-value pair in Properties into the configuration file. If the configuration file contains Chinese in IDEA, it will be converted to the corresponding Unicode encoding |
1.2 code example:
public class PropertiesDemo {public static void main(String[] args) throws IOException {// Create Properties objectProperties properties = new Properties();// load fileproperties.load(new FileReader("E:\\Codes\\myProject\\JiShiTongXun\\propertiesDemo\\mysql.properties"));// pass in the standard output streamproperties.list(System.out);// get the valueString user = properties.getProperty("name");String age = properties.getProperty("age");System.out.println("Username: "+user+" Age: "+age);// Set the key-value pair, if the key exists, it is modified, if the key does not exist, create a new oneproperties.setProperty("name","java");// get the valueString user2 = properties.getProperty("name");System.out.println("Username: "+user2+" Age: "+age);// create new fileproperties.setProperty("lookMoonup","zhangjie");// store K-V to fileproperties.store(new FileOutputStream("E:\\Codes\\myProject\\JiShiTongXun\\propertiesDemo\\mysqlsave.properties"),null);System.out.println("Save successfully");}}
2 netstat -an : View the current host network status, including port status and network connection
netstat -an | more: 分页显示
netstat -anb: 可以查看是哪个程序使用端口
Conclusion
Please stay here
Since you see this, why don't you like itlet's go
The purpose of this article is to share the technology and remember the points that need to be paid attention to in the learning process, and record the learning process;
If there is any error, please correct me, if you have any comments or suggestions, please welcomeDiscuss in the comments section
边栏推荐
- 逆向理论知识3【UI修改篇】
- Problems caused by List getting the difference
- Basic introduction to protect the network operations
- Summary of Rpc and gRpc Introduction
- Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (6) Question Opening Reply PPT
- 逆向分析实战2
- The difference between BGP room and ordinary room in Beijing
- 小程序毕设作品之微信二手交易小程序毕业设计成品(5)任务书
- Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (7) Interim Inspection Report
- 骁龙7系芯片表现如何?Reno8 Pro佐证新一代神U
猜你喜欢
Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Works (4) Opening Report
Hystrix 服务熔断
Nacos服务注册与发现
LoadBalancer load balancing
路由过滤器
操作配置:如何在一台服务器中以服务方式运行多个EasyCVR程序?
Gateway 路由网关
历经5面的阿里实习面经篇~
spicy (1) basic definition
Basic introduction to protect the network operations
随机推荐
route filter
小程序毕设作品之微信二手交易小程序毕业设计成品(3)后台功能
SDL播放器实战
List获取差集产生的问题
STM32 SPI+WM8978语音回环
【转】Swift 中的面向协议编程:引言
CMake的安装和测试
Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Work (2) Mini Program Function
小程序毕设作品之微信积分商城小程序毕业设计成品(5)任务书
淘宝/天猫获得淘宝店铺详情 API
Wechat second-hand transaction small program graduation design finished product (1) Development overview
Sentinel 流量防卫兵
Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Products (1) Development Overview
(redistribute, special comprehensive experiment ospf area)
智能答题功能,CRMEB知识付费系统必须有!
flutter 记录学习不一样的动画(一)
Redis server启动后会做哪些操作?
spicy (1) basic definition
cv2.polylines
Nacos实现高可用