小编Myj*_*516的帖子

将 YAML 文件转换为 Application.properties

我们如何将 YAML 文件转换为Application.properties

pay.payment:
  sandbox:
   Url: https://securegw-stage//processTransaction
    callbackUrl: http://localhost:8080/pgresponse
    details:
      CHANNEL_ID: '${pay.payment.sandbox.channelid}'
      INDUSTRY_TYPE_ID: '${pay.payment.sandbox.industrytypeid}'
      CALLBACK_URL: '${pay.payment.sandbox.callbackUrl}'
Run Code Online (Sandbox Code Playgroud)

是否有任何工具可以在线将 YAML 转换为 app.properties?

spring-boot application.properties

5
推荐指数
2
解决办法
2万
查看次数

java 8中两个列表对象的交集

java 8中的两个列表对象的交集.有人能告诉我我做错了什么吗?

List<Student> originalStudent = new ArrayList<>();
List<Student> newStudent = new ArrayList<>();

List<Student> intersectListStudent = new LinkedList<>()

originalStudent.add(new Student("William", "Tyndale",1));
originalStudent.add(new Student("Jonathan", "Edwards",2));
originalStudent.add(new Student("Martin", "Luther"),3);

newStudent.add(new Student("Jonathan", "Edwards",2));
newStudent.add(new Student("James", "Tyndale",4));
newStudent.add(new Student("Roger", "Moore",5));


originalStudent.forEach(n ->
        newStudent.stream()
                .filter(db -> !n.getName().equals(db.getName()) &&
                        !n.getLastName().equals(db.getLastName()))
                    .forEach(student-> intersectListStudent .add(student)));
Run Code Online (Sandbox Code Playgroud)

java arraylist intersect java-8 java-stream

2
推荐指数
1
解决办法
1849
查看次数