广告
返回顶部
首页 > 资讯 > 后端开发 > Python >Lombok 安装和使用小技巧
  • 652
分享到

Lombok 安装和使用小技巧

2024-04-02 19:04:59 652人浏览 薄情痞子

Python 官方文档:入门教程 => 点击学习

摘要

目录简介安装 LombokLombok 使用具体使用常用注解总结:简介 为了减少写一些 get/set/toString 方法,让项目代码更加整洁,提高开发效率,发现大家都开始采用

简介

为了减少写一些 get/set/toString 方法,让项目代码更加整洁,提高开发效率,发现大家都开始采用 Lombok 这个工具。Lombok 是一个 Java 类库,它会自动插入编辑器和构建工具,用于帮助开发人员消除 Java 中冗长样板代码。而我们开发人员所要做的,仅仅是添加几个 Lombok 中的注解,就可以替换掉原来的多行 get/set/toString 方法代码,既简洁也易于维护。下面我们就来看看,如何安装并使用这一工具。

安装 Lombok

日常开发中,相信大多数人现在使用的都是 idea 这个 Java 神器了,如果你还在使用 Eclipse 或者 MyEclipse 等工具,那强烈推荐你去体验一把 IDEA,相信你一用上它就会爱上他它的强大!下面我就一在 IDEA 中使用 Lombok 为例,看看如何安装并使用它。

在先前 IDEA 的版本中,Lombok 是需要通过插件来安装的,安装方法如下:依次进入File -> Settings -> Plugins,然后搜索 Lombok ,最后进行安装即可。而在新版本的 IDEA 中,Lombok 已经被集成到 IDEA 中,我们不用再去安装它就可以直接使用,可以说是十分方便了。

老版本 IDEA 安装 Lombok

新版本中集成了 Lombok

以上就是 Lombok 的安装过程了,是不是十分简单?那接下来我们就来看看,如何在我们的项目中使用 Lombok!

Lombok 使用

现在大家进行项目管理时用的工具大多应该都是 Maven,所以我们直接在需要使用 Lombok 的项目中加入 Lombok 编译支持,也就是在 pom.xml 文件中加入以下依赖。

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
</dependency>

导入相关依赖之后,接下来就是具体使用过程了。

具体使用

在需要的实体类中引入相关注解即可,只不过注解不同它们所对应的功能也不同,而且同一个注解可能在不同位置的功能也不一样。如下图;

常用注解

@Data

注解在 类 上:给类的所有属性提供 get 和 set 方法,此外还有 equals、canEqual、hashCode、toString 方法以及 默认参数为空的构造方法;

使用前:

package com.cunyu.user.entity;

public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;

    public User() {
    }

    public Long getId() {
        return this.id;
    }

    public String getName() {
        return this.name;
    }

    public Integer getAge() {
        return this.age;
    }

    public String getEmail() {
        return this.email;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public void setAge(final Integer age) {
        this.age = age;
    }

    public void setEmail(final String email) {
        this.email = email;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof User)) {
            return false;
        } else {
            User other = (User)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label59;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label59;
                    }

                    return false;
                }

                Object this$age = this.getAge();
                Object other$age = other.getAge();
                if (this$age == null) {
                    if (other$age != null) {
                        return false;
                    }
                } else if (!this$age.equals(other$age)) {
                    return false;
                }

                Object this$name = this.getName();
                Object other$name = other.getName();
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$email = this.getEmail();
                Object other$email = other.getEmail();
                if (this$email == null) {
                    if (other$email != null) {
                        return false;
                    }
                } else if (!this$email.equals(other$email)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof User;
    }

    public int hashCode() {
        int PRIME = true;
        int result = 1;
        Object $id = this.getId();
        int result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $age = this.getAge();
        result = result * 59 + ($age == null ? 43 : $age.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $email = this.getEmail();
        result = result * 59 + ($email == null ? 43 : $email.hashCode());
        return result;
    }

    public String toString() {
        Long var10000 = this.getId();
        return "User(id=" + var10000 + ", name=" + this.getName() + ", age=" + this.getAge() + ", email=" + this.getEmail() + ")";
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.Data;


@Data
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@Setter

注解在 类 上:为该类所有属性均提供 set 方法,同时提供 默认构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    public User() {
    }
    public void setId(final Long id) {
        this.id = id;
    }
    public void setName(final String name) {
        this.name = name;
    }
    public void setAge(final Integer age) {
        this.age = age;
    }
    public void setEmail(final String email) {
        this.email = email;
    }
}

使用后:

package com.cunyu.user.entity;

import lombok.Setter;

@Setter
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

注解在 属性 上:为该属性提供 set 方法,同时提供 默认构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    public User() {
    }
    public void setId(final Long id) {
        this.id = id;
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.Setter;

public class User {
    @Setter
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@Getter

注解在 类 上:为该类所有属性均提供 get 方法,同时提供 默认构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    public User() {
    }
    public Long getId() {
        return this.id;
    }
    public String getName() {
        return this.name;
    }
    public Integer getAge() {
        return this.age;
    }
    public String getEmail() {
        return this.email;
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.Getter;

@Getter
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

注解在 属性 上:为该属性提供 get 方法,同时提供 默认构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    public User() {
    }
    public Long getId() {
        return this.id;
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.Getter;

public class User {
    @Getter
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@ToString

注解在 类 上:生成所有参数的 toString() 方法,同时提供 默认构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    public User() {
    }
    public String toString() {
        return "User(id=" + this.id + ", name=" + this.name + ", age=" + this.age + ", email=" + this.email + ")";
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.ToString;

@ToString
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@Value

注解在 类 上:生成 get 方法,以及 equals、hashCode、toString 方法,同时提供 含所有参数的构造方法;

使用前:

package com.cunyu.user.entity;
public final class User {
    private final Long id;
    private final String name;
    private final Integer age;
    private final String email;
    public User(final Long id, final String name, final Integer age, final String email) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.email = email;
    }
    public Long getId() {
        return this.id;
    }
    public String getName() {
        return this.name;
    }
    public Integer getAge() {
        return this.age;
    }
    public String getEmail() {
        return this.email;
    }
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof User)) {
            return false;
        } else {
            User other;
            label56: {
                other = (User)o;
                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id == null) {
                        break label56;
                    }
                } else if (this$id.equals(other$id)) {
                    break label56;
                }
                return false;
            }
            label49: {
                Object this$age = this.getAge();
                Object other$age = other.getAge();
                if (this$age == null) {
                    if (other$age == null) {
                        break label49;
                    }
                } else if (this$age.equals(other$age)) {
                    break label49;
                }

                return false;
            }
            Object this$name = this.getName();
            Object other$name = other.getName();
            if (this$name == null) {
                if (other$name != null) {
                    return false;
                }
            } else if (!this$name.equals(other$name)) {
                return false;
            }

            Object this$email = this.getEmail();
            Object other$email = other.getEmail();
            if (this$email == null) {
                if (other$email != null) {
                    return false;
                }
            } else if (!this$email.equals(other$email)) {
                return false;
            }

            return true;
        }
    }
    public int hashCode() {
        int PRIME = true;
        int result = 1;
        Object $id = this.getId();
        int result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $age = this.getAge();
        result = result * 59 + ($age == null ? 43 : $age.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $email = this.getEmail();
        result = result * 59 + ($email == null ? 43 : $email.hashCode());
        return result;
    }
    public String toString() {
        Long var10000 = this.getId();
        return "User(id=" + var10000 + ", name=" + this.getName() + ", age=" + this.getAge() + ", email=" + this.getEmail() + ")";
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.Value;


@Value
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@AllArgsConstructor

注解在 类 上:为类提供一个 全参构造方法,但此时不再提供默认构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;

    public User(final Long id, final String name, final Integer age, final String email) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.email = email;
    }
}

使用后:

package com.cunyu.user.entity;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@NoArgsConstructor

注解在 类 上:为类提供一个 无参构造方法;

使用前:

package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
    public User() {
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.NoArgsConstructor;

@NoArgsConstructor
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@RequiredArgsConstructor

注解在 类 上:使用类中所有带 @NonNull 注解的或带有 final 修饰的成员变量生成对应构造方法;

使用前:

package com.cunyu.user.entity;
import lombok.NonNull;
public class User {
    @NonNull
    private Long id;
    private String name;
    private Integer age;
    @NonNull
    private String email;

    public User(@NonNull final Long id, @NonNull final String email) {
        if (id == null) {
            throw new NullPointerException("id is marked non-null but is null");
        } else if (email == null) {
            throw new NullPointerException("email is marked non-null but is null");
        } else {
            this.id = id;
            this.email = email;
        }
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class User {
    @NonNull
    private Long id;
    private String name;
    private Integer age;
    @NonNull
    private String email;
}

@NonNull

注解在 属性 上,自动生成一个关于该参数的非空检查,若参数为 null,则抛出一个空指针异常,同时提供 默认构造方法,具体用法可以参照上面的例子;

@EqualsAndHashCode

注解在 类 上,生成 equals、canEquals、hasnCode 方法,同时会生成默认构造方法;

使用前:

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package com.cunyu.user.entity;
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;

    public User() {
    }
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof User)) {
            return false;
        } else {
            User other = (User)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label59: {
                    Object this$id = this.id;
                    Object other$id = other.id;
                    if (this$id == null) {
                        if (other$id == null) {
                            break label59;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label59;
                    }

                    return false;
                }

                Object this$age = this.age;
                Object other$age = other.age;
                if (this$age == null) {
                    if (other$age != null) {
                        return false;
                    }
                } else if (!this$age.equals(other$age)) {
                    return false;
                }

                Object this$name = this.name;
                Object other$name = other.name;
                if (this$name == null) {
                    if (other$name != null) {
                        return false;
                    }
                } else if (!this$name.equals(other$name)) {
                    return false;
                }

                Object this$email = this.email;
                Object other$email = other.email;
                if (this$email == null) {
                    if (other$email != null) {
                        return false;
                    }
                } else if (!this$email.equals(other$email)) {
                    return false;
                }

                return true;
            }
        }
    }
    protected boolean canEqual(final Object other) {
        return other instanceof User;
    }
    public int hashCode() {
        int PRIME = true;
        int result = 1;
        Object $id = this.id;
        int result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $age = this.age;
        result = result * 59 + ($age == null ? 43 : $age.hashCode());
        Object $name = this.name;
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $email = this.email;
        result = result * 59 + ($email == null ? 43 : $email.hashCode());
        return result;
    }
}

使用后:

package com.cunyu.user.entity;
import lombok.EqualsAndHashCode;


@EqualsAndHashCode
public class User {
    private Long id;
    private String name;
    private Integer age;
    private String email;
}

@Cleanup

注解在 局部变量 前,保证该变量代表的资源使用后自动关闭,默认调用资源的 close() 方法,若该资源有其它关闭方法,可用 @Cleanup("方法名") 来指定要调用的方法,同时提供 默认构造方法;

使用前:

import java.io.*;

public class CleanupExample {
    public static void main(String[] args) throws IOException {
        InputStream in = new FileInputStream(args[0]);
        try {
            OutputStream out = new FileOutputStream(args[1]);
            try {
                byte[] b = new byte[10000];
                while (true) {
                    int r = in.read(b);
                    if (r == -1) break;
                    out.write(b, 0, r);
                }
            } finally {
                if (out != null) {
                    out.close();
                }
            }
        } finally {
            if (in != null) {
                in.close();
            }
        }
    }
}

使用后:

import lombok.Cleanup;
import java.io.*;

public class CleanupExample {
    public static void main(String[] args) throws IOException {
        @Cleanup InputStream in = new FileInputStream(args[0]);
        @Cleanup OutputStream out = new FileOutputStream(args[1]);
        byte[] b = new byte[10000];
        while (true) {
            int r = in.read(b);
            if (r == -1) break;
            out.write(b, 0, r);
        }
    }
}

@Synchronized

注解在 类方法 或 实例方法:效果与 synchronized 关键字相同,区别在于对象不同,对于类方法和实例方法,synchronized 关键字的锁对象分别是 类的 class 对象和 this 对象,而 @Synchronized 的锁对象分别是 私有静态 final 对象 lock 和 私有 final 对象 lock,也可以自己指定锁对象,同时提供默认构造方法;

使用前:

public class SynchronizedExample {
    private static final Object $LOCK = new Object[0];
    private final Object $lock = new Object[0];
    private final Object readLock = new Object();
    public static void hello() {
        synchronized($LOCK) {
            System.out.println("world");
        }
    }
    public int answerToLife() {
        synchronized($lock) {
            return 42;
        }
    }

    public void foo() {
        synchronized(readLock) {
            System.out.println("bar");
        }
    }
}

使用后:

import lombok.Synchronized;
public class SynchronizedExample {
    private final Object readLock = new Object();
    @Synchronized
    public static void hello() {
        System.out.println("world");
    }
    @Synchronized
    public int answerToLife() {
        return 42;
    }
    @Synchronized("readLock")
    public void foo() {
        System.out.println("bar");
    }
}

@SneakyThrows

注解在 方法 上:将方法中的代码用 try-catch 语句包裹,捕获异常并在 catch 中用 Lombok.sneakyThrow(e) 将异常抛出,还可以用 @SneakyThrows(Exception.class) 的形式指定抛出异常类型,同时提供 默认构造方法;

使用前:

import lombok.Lombok;
public class SneakyThrowsExample implements Runnable {
    public String utf8ToString(byte[] bytes) {
        try {
            return new String(bytes, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw Lombok.sneakyThrow(e);
        }
    }
    public void run() {
        try {
            throw new Throwable();
        } catch (Throwable t) {
            throw Lombok.sneakyThrow(t);
        }
    }
}

使用后:

import lombok.SneakyThrows;
public class SneakyThrowsExample implements Runnable {
    @SneakyThrows(UnsupportedEncodingException.class)
    public String utf8ToString(byte[] bytes) {
        return new String(bytes, "UTF-8");
    }
    @SneakyThrows
    public void run() {
        throw new Throwable();
    }
}

@Log

注解在 类 上:主要用于我们记录日志信息,同时提供 默认构造方法。它封装了多个主流 Log 库,主要有如下几个;

  • @Log
  • @Slf4j
  • Log4j
  • Log4j2

总结:

到此这篇关于Lombok 安装和使用小技巧的文章就介绍到这了,更多相关Lombok 内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!

--结束END--

本文标题: Lombok 安装和使用小技巧

本文链接: https://www.lsjlt.com/news/149435.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Lombok 安装和使用小技巧
    目录简介安装 LombokLombok 使用具体使用常用注解总结:简介 为了减少写一些 get/set/toString 方法,让项目代码更加整洁,提高开发效率,发现大家都开始采用 ...
    99+
    2022-11-13
  • mysql 安装 和简单使用技巧1
    # mysql_install_db  --user=mysql -datadir=/var/lib/mysql   初始化数据vncviewer  172.40.50.117...
    99+
    2022-10-18
  • 一文详解Lombok中@ToString()的使用技巧
    目录Lombok 的使用Lombok的配置父类 toString() 的调用省略字段名称使用字段代替 Getter字段的包含和排除输出排序方法输出修改字段名称打印数组有一些注意点在平...
    99+
    2023-02-03
    Lombok @ToString()使用技巧 Lombok @ToString()使用 Lombok @ToString()
  • IDEA 安装lombok及使用详解
    目录 ① 为什么使用 ② 如何安装 1.安装lombok插件:    2.添加lombok的maven的pom.xml依赖:   3.实体类示例代码Student.java 4.测试类LombokTest.java    5. 输出结果: ...
    99+
    2023-09-02
    intellij-idea java ide
  • IDEA中安装和使用Lombok插件的方法
    背景 我们在开发过程中,通常都会定义大量的JavaBean,然后通过IDE去生成其属性的构造器、getter、setter、equals、hashcode、toString方法,当要...
    99+
    2022-11-12
  • Java的Lombok如何安装与使用
    这篇文章主要介绍了Java的Lombok如何安装与使用,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。安装Lombok的安装分两部分:Idea插件的安装和maven中pom文件...
    99+
    2023-06-29
  • PyCharm使用小技巧
    本文部分内容参考了明宇李前辈的博客,原文请阅读 Pycharm的配置(背景颜色,字体,解释器等); 鼠标滑轮控制字体大小 部分参考了墨颜前辈的博客,原文请阅读 用鼠标滑轮控制代码字体大小; 感谢各位前辈的分享。除此之外,其余均为自己平时使...
    99+
    2023-01-31
    小技巧 PyCharm
  • Python自动安装第三方库的小技巧(pip使用详解)
    目录1. pip在线安装2. pip离线安装3. 查看与升级库4. 设置国内源5. pip.main自动安装6. 其他大家好,我是才哥。 最近周末也加班了,害… 有刚接触python的粉丝同学在运行此前《》的完整代码...
    99+
    2022-06-02
    python第三方库安装 python pip使用
  • 3.python小技巧分享-使用min和
    睡前分享一个小技巧~使用min和max函数来巧妙的查找一个字典中的最大value和最小value。比如说,现在有一个字典,字典的key是用户名,value则是这个用户的账户有多少钱。现在想要找出账户内余额最多的用户,请问如何实现?d1 = ...
    99+
    2023-01-31
    小技巧 python min
  • Lombok插件的安装与简单使用步骤
    目录Lombok插件的安装与简单使用使用它我们需要以下几步1.添加依赖:2.在idea中进行安装 3.使用Lombok插件的安装与简单使用 关于Lombok:可以给类的属性生成set...
    99+
    2022-11-12
  • Java开发神器Lombok安装与使用详解
    目录安装Idea插件的安装maven中pom文件的导入使用val@Data@Getter/@Setter@Log4j@AllArgsConstructor@NoArgsConstru...
    99+
    2022-11-13
  • MybatisGenerator具体使用小技巧
    目录1、问题描述2、解决方案2.1pom中指定mybatisgenerator插件2.2generatorConfig.xml2.3执行2.4总结1、问题描述 mybatis gen...
    99+
    2022-11-12
  • Python 小技巧:如何批量更新已安装的库?
    众所周知,升级某个库(假设为 xxx),可以用 pip install --upgrade xxx 命令,或者简写成 pip install -U xxx 。 如果有多个库,可以依次写在 xxx 后面...
    99+
    2023-09-07
    python 开发语言 Python入门 数据分析 pycharm
  • windows8的50个使用小技巧 win8的50个小技巧大全
    1、锁屏启动之后,用户将首先看到Windows 8的锁屏界面,每当系统启动、恢复或登录的时候,锁屏就会出现。如果您使用的是触摸屏设备,那么用手指一扫然后输入密码就可以登录系统。如果不是触摸屏设备,那么就用鼠...
    99+
    2022-06-04
    小技巧 大全
  • [电脑使用技巧]Windows 11安装安卓手机APP
    如果你的电脑已经运行Windows 11,经常在电脑和手机来复制内容,那我们为什么不在Windows 上实现安卓APP的应用呢?其实操作真的非常简单,我们接下来给大家分享下如何实现在Windows 11的系统上安装的app。只要按照下面的步...
    99+
    2023-09-03
    android 智能手机
  • Win10系统离线安装运行环境.NET Framework小技巧
    新系统装完第一件事莫过于安装七七八八的运行环境,其中.NET Framework则是非常重要的。当我们安装某些软件的时候会提示“你的电脑上的应用需要使用以下Windows功能:.NET Framework 3...
    99+
    2023-06-07
    Win10 离线安装 Framework 环境 系统 离线 运行 技巧
  • 使用Laravel的一些小技巧
    这篇文章给大家分享的是有关使用Laravel的一些小技巧的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。Laravel 是什么Laravel 是一套简洁、优雅的PHP Web开发框架。它可以让你从面条一样杂乱的代码...
    99+
    2023-06-14
  • Postman使用指南及小技巧
    目录一、什么是 Postman(前世今生)二、使用变量2.1 变量作用域适用于 Postman 中不同的场景2.2 编辑全局和环境变量2.3 编辑集合变量2.4 使用系统内置动态变量...
    99+
    2022-11-12
  • Redis 使用的 10 个小技巧
    Redis 在当前的技术社区里是非常热门的。从来自 Antirez 一个小小的个人项目到成为内存数据存储行业的标准,Redis已经走过了很长的一段路。 随之而来的一系列最佳实践,使得大多数人可以正确地使用 Redis。 下面我们将...
    99+
    2014-08-05
    Redis 使用的 10 个小技巧
  • Android使用EditText小技巧汇总
    目录1、隐藏android中EditText自带的的下划线2、让软键盘出现搜索按钮3、多行EditText的时候会出现光标在中间的问题:4、修改EditText的光标颜色5、通过监听...
    99+
    2022-11-12
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作