feat(v1): add learn/advanced profiles and interactive learning task card
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.example.scaffold.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
public class LearningProfileInfo {
|
||||
|
||||
@Value("${spring.profiles.active:learn}")
|
||||
private String activeProfile;
|
||||
|
||||
@Value("${app.enabled-modules:ioc,aop,mybatis,transaction,users}")
|
||||
private String[] enabledModules;
|
||||
|
||||
@GetMapping("/api/profile")
|
||||
public Map<String, Object> profileInfo() {
|
||||
return Map.of(
|
||||
"profile", activeProfile,
|
||||
"enabledModules", Arrays.asList(enabledModules)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user