当前位置:网站首页>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
边栏推荐
- (六)《数电》——二极管与CMOS门电路(入门)
- Nacos installation and deployment
- 高并发框架 Disruptor
- 精品:淘宝/天猫获取购买到的商品订单详情 API
- 小程序毕设作品之微信二手交易小程序毕业设计成品(7)中期检查报告
- Nacos服务注册与发现
- 小程序毕设作品之微信积分商城小程序毕业设计成品(3)后台功能
- Let's learn the layout components of flutter together
- WeChat second-hand transaction small program graduation design finished works (8) graduation design thesis template
- The difference between BGP room and ordinary room in Beijing
猜你喜欢

Process priority nice

小程序毕设作品之微信积分商城小程序毕业设计成品(3)后台功能

OpenFeign implementation downgrade

小程序毕设作品之微信二手交易小程序毕业设计成品(6)开题答辩PPT

(6) "Digital Electricity" - Diodes and CMOS Gate Circuits (Introduction)

Mini Program Graduation Works WeChat Second-hand Trading Mini Program Graduation Design Finished Work (2) Mini Program Function

小程序毕设作品之微信二手交易小程序毕业设计成品(3)后台功能

CMake的安装和测试

Eureka注册中心

Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Products (3) Background Functions
随机推荐
逆向理论知识3【UI修改篇】
新型LaaS协议Elephant Swap给ePLATO提供可持续溢价空间
CMake installation and testing
New interface - API interface for "Taote" keyword search
Basic introduction to protect the network operations
Small application project works WeChat integral mall small program of graduation design (4) the opening report of finished product
How to solve the error "no such file or directory" when EasyCVR starts?
WeChat second-hand transaction small program graduation design finished works (8) graduation design thesis template
Mini Program Graduation Works WeChat Points Mall Mini Program Graduation Design Finished Products (6) Question Opening and Defense PPT
组织在线化:组织数字化变革的新趋势
小程序毕设作品之微信积分商城小程序毕业设计成品(4)开题报告
Summary of Rpc and gRpc Introduction
Nacos实现高可用
Nacos配置中心
骁龙7系芯片表现如何?Reno8 Pro佐证新一代神U
SDL player in action
Tcp programming
Nacos installation and deployment
[Node accesses MongoDB database]
高并发框架 Disruptor
Since you see this, why don't you like itlet's go