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; @Value("${auth.type:none}") private String authType; @GetMapping("/api/profile") public Map profileInfo() { return Map.of( "profile", activeProfile, "enabledModules", Arrays.asList(enabledModules), "authType", authType ); } }