当前位置:网站首页>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
边栏推荐
- Alibaba search new product data API by keyword
- 运行时间监控:如何确保网络设备运行时间
- Flutter records and learns different animations (1)
- Forum management system
- [Node accesses MongoDB database]
- 解决编译安装gdb-10.1 unistd.h:663:3: error: #error “Please include config.h first.“ 问题
- Nacos集群分区
- Uptime Monitoring: How to Ensure Network Device Uptime
- spicy (two) unit hooks
- The curl command to get the network IP
猜你喜欢

Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Work (5) Task Book

【Use of scientific research tools】A

Nacos命名空间

Nacos achieves high availability

Microservice CAP Principles

EasyCVR启动时报错“no such file or directory”,该如何解决?

OA Project Pending Meeting & History Meeting & All Meetings

Nacos服务注册与发现

高并发框架 Disruptor

Smart answer function, CRMEB knowledge payment system must have!
随机推荐
逆向理论知识3【UI修改篇】
The difference between BGP room and ordinary room in Beijing
TCP拥塞控制技术 与BBR的加速原理
Let's learn the layout components of flutter together
监控页面部署
Tcp编程
进程优先级 nice
How does the AI intelligent security video platform EasyCVR configure the simultaneous transmission of audio and video?
Hystrix 服务熔断
【驱动】udev设置GPIO加载后所有者、所属组和权限
redis分布式锁的原子保证
spicy(二)unit hooks
2022-07-29 Group 4 Self-cultivation class study notes (every day)
Transformation of traditional projects
小程序毕设作品之微信二手交易小程序毕业设计成品(3)后台功能
spicy (two) unit hooks
ospf 综合实验(重发布,特殊区域)
小程序毕设作品之微信积分商城小程序毕业设计成品(7)中期检查报告
写给技术人的管理入门知识1:什么是管理
防抖与节流
Since you see this, why don't you like itlet's go