feat(v1): add learn/advanced profiles and interactive learning task card

This commit is contained in:
likingcode
2026-03-08 14:40:30 +00:00
parent dd2b4d0e4b
commit 2b8b4213e2
5 changed files with 131 additions and 3 deletions

View File

@@ -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)
);
}
}