上一页 1 ··· 160 161 162 163 164 165 166 167 168 ··· 497 下一页
摘要: If you need to convert a deep nested object struture, you cannot just use @InitBinder, you need to build a custom convertor: Exp: conver city prop in 阅读全文
posted @ 2021-01-13 00:54 Zhentiw 阅读(123) 评论(0) 推荐(0)
摘要: For example, from the client, it send date as string to BE. But BE requires date to be a Date instead of String. Controller: .. @Autowired private Use 阅读全文
posted @ 2021-01-13 00:39 Zhentiw 阅读(106) 评论(0) 推荐(0)
摘要: User entity: import javax.validation.constraints.*; @Entity public class User { @Id private int id; @Size(min = 6, message = "Username cannot be less 阅读全文
posted @ 2021-01-12 20:54 Zhentiw 阅读(88) 评论(0) 推荐(0)
摘要: @Repository public interface ProductRepository extends CrudRepository<Product, Integer> { @Query("select p from Product p where p.name like %:name%") 阅读全文
posted @ 2021-01-12 15:49 Zhentiw 阅读(158) 评论(0) 推荐(0)
摘要: Set<Book> lib = ... lib.stream() .flatMap(book -> book.getWords().stream()) .distinct() .forEach(System.out::println); 阅读全文
posted @ 2021-01-07 03:22 Zhentiw 阅读(129) 评论(0) 推荐(0)
摘要: Entity: package com.frankmoley.security.app.auth; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Generated 阅读全文
posted @ 2021-01-06 02:42 Zhentiw 阅读(130) 评论(0) 推荐(0)
摘要: Code to improve: final Collection<DiscussionTopics> topics = s.getTopics(); final boolean anyTopics = topics != null && !topics.isEmpty(); Change to: 阅读全文
posted @ 2021-01-05 17:05 Zhentiw 阅读(62) 评论(0) 推荐(0)
摘要: Module defined what can be used inside the module package and what outside world can use inside our module. module-info.java /* * To change this licen 阅读全文
posted @ 2021-01-04 02:44 Zhentiw 阅读(108) 评论(0) 推荐(0)
摘要: Highlights: Solve the complexities of write Redux (actions, reducers, selector...middleware...) Solve the immutable pattern with nested spread operato 阅读全文
posted @ 2021-01-02 21:06 Zhentiw 阅读(382) 评论(0) 推荐(0)
摘要: public class Code { public static void main(String[] args) { IntStreams.range(1,4) .forEach(System.out::println); // 1 2 3 Arrays.stream(new int[] {1, 阅读全文
posted @ 2020-12-30 03:47 Zhentiw 阅读(84) 评论(0) 推荐(0)
上一页 1 ··· 160 161 162 163 164 165 166 167 168 ··· 497 下一页