什么是CPU密集型、IO密集型 发表于 2019-05-20 更新于 2023-03-01 分类于 MultiThread 本文字数: 868 阅读时长 ≈ 3 分钟 CPU密集型(CPU-bound) 阅读全文 »
Maven PurgingLocalRepository 发表于 2019-05-20 更新于 2023-03-01 分类于 Maven 本文字数: 97 阅读时长 ≈ 1 分钟 Purging local repository dependenciesThe purpose of thedependency:purge-local-repositorygoal is to purge (delete and optionally re-resolve) artifacts from the local maven repository. This page describes some of the configuration options available to the plugin. 1mvn dependency:purge-local-repository 阅读全文 »
Maven maven.test.skip和skipTests的区别 发表于 2019-05-20 更新于 2023-03-01 分类于 Maven 本文字数: 94 阅读时长 ≈ 1 分钟 **-DskipTests**,不执行测试用例,但编译测试用例类生成相应的class文件至target/test-classes下。 **-Dmaven.test.skip=true**,不执行测试用例,也不编译测试用例类。 也可以在pom.xml文件中修改 12345678910111213141516<plugin> <groupId>org.apache.maven.plugin</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.1</version> <configuration> <skip>true</skip> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.5</version> <configuration> <skip>true</skip> </configuration> </plugin>
Maven Deploy 发表于 2019-05-20 更新于 2023-03-01 分类于 Maven 本文字数: 59 阅读时长 ≈ 1 分钟 pom.xml配置123456789101112<distributionManagement> <repository> <id>releases</id> <name>Internal Releases</name> <url>http://121.40.185.58:8081/nexus/content/repositories/thirdparty</url> </repository> <snapshotRepository> <id>releases</id> <name>Internal Releases</name> <url>http://121.40.185.58:8081/nexus/content/repositories/thirdparty</url> </snapshotRepository> </distributionManagement> setting.xml文件配置12345<server> <id>releases</id> <username>admin</username> <password>admin123</password> </server>
Lambda表达式 发表于 2019-05-20 更新于 2023-03-01 分类于 Java 本文字数: 310 阅读时长 ≈ 1 分钟 语法123(parameters) -> expression或(parameters) ->{ statements; } 可选类型声明:不需要声明参数类型,编译器可以统一识别参数值。 可选的参数圆括号:一个参数无需定义圆括号,但多个参数需要定义圆括号。 可选的大括号:如果主体包含了一个语句,就不需要使用大括号。 可选的返回关键字:如果主体只有一个表达式返回值则编译器会自动返回值,大括号需要指定明表达式返回了一个数值。 Lambda 表达式实例1234567891011121314// 1. 不需要参数,返回值为 5 () -> 5 // 2. 接收一个参数(数字类型),返回其2倍的值 x -> 2 * x // 3. 接受2个参数(数字),并返回他们的差值 (x, y) -> x – y // 4. 接收2个int型整数,返回他们的和 (int x, int y) -> x + y // 5. 接受一个 string 对象,并在控制台打印,不返回任何值(看起来像是返回void) (String s) -> System.out.print(s) 变量作用域lambda 表达式只能引用标记了 final 的外层局部变量,这就是说不能在 lambda 内部修改定义在域外的局部变量,否则会编译错误。