统计目录下java代码行数
发表于|更新于
|浏览量:
画画用的是脑筋,而不是双手。——米开朗基罗
例如
1 | find /Users/achao/IdeaProjects/ -name "*.java" | xargs wc -l |
即可
相关推荐
2021-04-09
@JsonAutoDetect
背叛就是脱离自己的位置,背叛,就是摆脱原位,投向未知。——米兰·昆德拉 我们在使用jackson时可能会用到这样一个注解 1@JsonAutoDetect 例如我们这里一个Student类 123456789101112131415161718@Data@Builder@NoArgsConstructor@AllArgsConstructor@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility = JsonAutoDetect.Visibility.PUBLIC_ONLY, creatorVisibility = JsonAutoDetect.Visibility.NON_PRIVATE, fieldVisibility = JsonAutoDetect.Visibility.PUBLIC...
2021-07-20
接口能玩的小花招
一个人的礼貌是一面照出他的肖像的镜子。——歌德 首先写一个函数式接口 12345678910@FunctionalInterfacepublic interface Person { /** * 睡 * * @author <achao1441470436@gmail.com> * @since 2021/7/20 0020 23:20 */ void sleep();} 我们能通过调用其中的sleep方法执行函数(方法) 123 Person person = () -> System.out.println("睡"); person.sleep();// 执行结果:睡 而执行的函数则是我们接口本身,这个函数式接口就代表了一个函数 函数式接口 其实就可以理解为 函数、方法本身 但我们今天主要聊的不是这个 我们在函数中定义的变量默认就是常量 1234567891011121314@FunctionalInterfacepublic interf...
2021-07-22
创建只读集合
真正的人生,只有在经过艰难卓绝的斗争之后才能实现。——塞涅卡 在java8中 我们可以使用下面的函数创建只读集合 12345678Collections.unmodifiableCollection(Arrays.asList(""));Collections.unmodifiableList(Collections.singletonList(""));Collections.unmodifiableMap(new HashMap<>(1 << 4));Collections.unmodifiableSet(new HashSet<>());Collections.unmodifiableNavigableMap(new TreeMap<>());Collections.unmodifiableNavigableSet(new TreeSet<>());Collections.unmodifiableSortedMap(new TreeMap<>());Colle...
2022-10-12
stream-core实现枚举校验
同一个美丽而聪慧的人相处,能使人紧张的神经放松,感情变得柔和——巴尔扎尔 引入依赖: 123456<!-- https://search.maven.org/artifact/io.github.vampireachao/stream-query --><dependency> <groupId>io.github.vampireachao</groupId> <artifactId>stream-core</artifactId> <version>1.1.12</version></dependency> 编写代码: 123456789101112131415161718192021222324252627@Testvoid test() { class User { public GenderEnum getGender() { return null; ...
2024-09-30
bean-searcher自动接收请求参数、多租户隔离、逻辑删除
今天尽你最大的努力去做好,明天你也许就能做得更好。——牛顿 文档地址如下: 其它玩法 | Bean Searcher Bean Searcher 的参数过滤器 ParamFilter,非常易于自定义,可以让我们用简单几行代码,就玩出其它 ORM 难以实现的花样。 自动接收请求参数1234567891011121314151617181920212223@Componentpublic class MyParamFilter implements ParamFilter { // 定义一个常量,作为一个开关,当启用时,则取消自动加载功能 public static final String IGNORE_REQUEST_PARAMS = "IGNORE_REQUEST_PARAMS"; @Override public <T> Map<String, Object> doFilter(BeanMeta<T> beanMeta, Map<String, Object> para...
2024-03-06
javadoc保留格式标签
不结果的树是没人去摇的。唯有那些果实累累的,才有人用石子去打。——罗曼·罗兰 在hutool中就有体现: 12345678910111213141516171819202122232425262728293031323334353637383940414243/* * Copyright (c) 2023 looly(loolly@aliyun.com) * Hutool is licensed under Mulan PSL v2. * You can use this software according to the terms and conditions of the Mulan PSL v2. * You may obtain a copy of Mulan PSL v2 at: * https://license.coscl.org.cn/MulanPSL2 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, * E...
