Created
January 2, 2018 19:30
-
-
Save chathurangat/46d0db83e2d1acacf3b163b96fc9e3eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
public class ApplicationLogController | |
{ | |
@Autowired | |
private AppConfiguration appConfiguration; | |
@Autowired | |
private EnvironmentService environmentService; | |
@Autowired | |
private ApplicationLogRepository repository; | |
@PostMapping("/logs") | |
public ApplicationLog createApplicationLog() | |
{ | |
ApplicationLog applicationLog = new ApplicationLog(); | |
applicationLog.setConfiguration(appConfiguration.getName()); | |
applicationLog.setEnvironment(environmentService.getCurrentEnvironment()); | |
return repository.save(applicationLog); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment