小编KRR*_*R16的帖子

如何在Spring Boot应用程序中设置系统属性

我需要在 Spring Boot 应用程序中设置系统属性。我不想从命令行设置它。

我关心的是最好的做法是什么。无论是从构造函数还是在 main 方法中。下面是从构造函数设置它的示例

@SpringBootApplication
class Sample{
@Autowired
protected TempInfoDao tempInfoDao;

public Sample{
   //Setting System property inside constructor
    System.setProperty("vertx.hazelcast.config","./config/cluster.xml");
}

/**
 * @param args
 */
public static void main(String[] args) {
    SpringApplication.run(Sample.class, args);
}
Run Code Online (Sandbox Code Playgroud)

}

最好的方法是什么?

vert.x spring-boot

8
推荐指数
1
解决办法
4万
查看次数

在黄瓜中传递功能文件中的名称和对象列表

我想在黄瓜的功能文件中传递类似的东西

Feature: Testing different requests on the XLR CD API
Scenario: Check if the student application can be accessed by users
Scenario Outline: Create a new student & verify if the student is added
When I create a new student by providing the information studentcollege <studentcollege> studentList <studentList>
Then I verify that the student with <student> is created
 Examples: 
  | studentcollege                   |  studentList                                                              | 
  | abcd                             | [{student_name": "student1","student_id": "1234"},{student_name": "student1","student_id": "1234"}]  | 
Run Code Online (Sandbox Code Playgroud)

我有课作为

Class Student{
     String name;
     String id; …
Run Code Online (Sandbox Code Playgroud)

cucumber

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

标签 统计

cucumber ×1

spring-boot ×1

vert.x ×1