1 | package edu.ucsb.cs156.example.services; | |
2 | ||
3 | ||
4 | import edu.ucsb.cs156.example.models.SystemInfo; | |
5 | import lombok.extern.slf4j.Slf4j; | |
6 | import org.springframework.beans.factory.annotation.Value; | |
7 | import org.springframework.boot.context.properties.ConfigurationProperties; | |
8 | import org.springframework.stereotype.Service; | |
9 | ||
10 | // This class relies on property values | |
11 | // For hints on testing, see: https://www.baeldung.com/spring-boot-testing-configurationproperties | |
12 | ||
13 | @Slf4j | |
14 | @Service("systemInfo") | |
15 | @ConfigurationProperties | |
16 | public class SystemInfoServiceImpl extends SystemInfoService { | |
17 | | |
18 | @Value("${spring.h2.console.enabled:false}") | |
19 | private boolean springH2ConsoleEnabled; | |
20 | ||
21 | @Value("${app.showSwaggerUILink:false}") | |
22 | private boolean showSwaggerUILink; | |
23 | ||
24 | public SystemInfo getSystemInfo() { | |
25 | SystemInfo si = SystemInfo.builder() | |
26 | .springH2ConsoleEnabled(this.springH2ConsoleEnabled) | |
27 | .showSwaggerUILink(this.showSwaggerUILink) | |
28 | .build(); | |
29 | log.info("getSystemInfo returns {}",si); | |
30 |
1
1. getSystemInfo : replaced return value with null for edu/ucsb/cs156/example/services/SystemInfoServiceImpl::getSystemInfo → KILLED |
return si; |
31 | } | |
32 | ||
33 | } | |
Mutations | ||
30 |
1.1 |