BAEL-15988 : Java file movement
This commit is contained in:
-15
@@ -1,15 +0,0 @@
|
||||
package com.baeldung.chaosmonkey;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Created by adi on 8/2/18.
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = { "com.baeldung.chaosmonkey" })
|
||||
public class SpringBootChaosMonkeyApp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SpringBootChaosMonkeyApp.class, args);
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.baeldung.chaosmonkey.controller;
|
||||
|
||||
import com.baeldung.chaosmonkey.service.PermissionsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by adi on 8/2/18.
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/permissions")
|
||||
public class PermissionsController {
|
||||
|
||||
@Autowired private PermissionsService permissionsService;
|
||||
|
||||
@GetMapping
|
||||
public List<String> getAllPermissions() {
|
||||
return permissionsService.getAllPermissions();
|
||||
}
|
||||
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.baeldung.chaosmonkey.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by adi on 8/2/18.
|
||||
*/
|
||||
@Service
|
||||
public class PermissionsService {
|
||||
|
||||
public List<String> getAllPermissions() {
|
||||
return Arrays.asList("CREATE", "READ", "UPDATE", "DELETE");
|
||||
}
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
package com.baeldung.git;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
@SpringBootApplication(scanBasePackages = { "com.baeldung.git" })
|
||||
public class CommitIdApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CommitIdApplication.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {
|
||||
PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer();
|
||||
c.setLocation(new ClassPathResource("git.properties"));
|
||||
c.setIgnoreResourceNotFound(true);
|
||||
c.setIgnoreUnresolvablePlaceholders(true);
|
||||
return c;
|
||||
}
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.baeldung.git;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
public class CommitInfoController {
|
||||
|
||||
@Value("${git.commit.message.short}")
|
||||
private String commitMessage;
|
||||
|
||||
@Value("${git.branch}")
|
||||
private String branch;
|
||||
|
||||
@Value("${git.commit.id}")
|
||||
private String commitId;
|
||||
|
||||
@GetMapping("/commitId")
|
||||
public Map<String, String> getCommitId() {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
result.put("Commit message", commitMessage);
|
||||
result.put("Commit branch", branch);
|
||||
result.put("Commit id", commitId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
### Relevant Articles:
|
||||
- [Injecting Git Information Into Spring](http://www.baeldung.com/spring-git-information)
|
||||
Reference in New Issue
Block a user