一键导入
spring-boot
Use for Spring Boot work in telegram-home-bot: configuration, scheduling, security, Thymeleaf, Telegram bot, OpenWeather, actuator, events, testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use for Spring Boot work in telegram-home-bot: configuration, scheduling, security, Thymeleaf, Telegram bot, OpenWeather, actuator, events, testing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when adding or changing Docker Compose for telegram-home-bot: app service, .env, persistent H2 data, SonarQube profile, bridge/host networking.
Use for Dockerfile and container runtime changes in telegram-home-bot: Raspberry Pi/Linux runtime, fping/iproute2, Gradle bootJar, network mode, ports, logs.
Use when changing database schema, writing Flyway migrations, reviewing SQL migrations, or working with H2 and Spring Boot database startup.
Use for Hibernate/JPA/Flyway work in telegram-home-bot: H2 schema migrations, Kotlin entities, repositories, lazy relations, sequences, entity equality.
Use for Kotlin code in telegram-home-bot: JVM 17, Spring Boot Kotlin, Gradle Groovy DSL, src/main/java Kotlin layout, null-safety, constructor DI, ktlint.
Use when changing Docker, Docker Compose, runtime configuration, Raspberry Pi deployment, Linux service setup, or lightweight production deployment.
| name | spring-boot |
| description | Use for Spring Boot work in telegram-home-bot: configuration, scheduling, security, Thymeleaf, Telegram bot, OpenWeather, actuator, events, testing. |
This project uses Spring Boot 3.5.4 with Kotlin. Key starters: Web, WebFlux, Data JPA, Security, Validation, Actuator, Thymeleaf, DevTools.
src/main/resources/application.yamlspring-dotenv (me.paulschwarz:spring-dotenv:4.0.0)@ConfigurationProperties classes: BotProperties, OpenWeatherProperties@Value for simple property injection with defaults: @Value("\${bcrypt.rounds}")WAKE_ON_LAN_BROADCAST_IP → wakeOnLan.broadcast.ip@Configuration
@EnableScheduling
class TaskConfig
@Component
class BroadcastPingScheduler {
@Scheduled(fixedRateString = "\${network-monitor.broadcast.ping.scheduled-time}")
fun runBroadcastPing() { /* ... */ }
}
@Scheduled ratesfixedRateString and initialDelayString with property references@Service
@ConditionalOnProperty(name = ["integrations.telegram.enabled"], havingValue = "true")
class DefaultTelegramMessageConsumer(/* ... */)
integrations.telegram.enabledintegrations.openweather.enabled@Controller + Thymeleaf for HTML views@RequestMapping with constants from AppConstants@PathVariable, @RequestParam for parameter binding"redirect:$MAPPING" using AppConstantsthymeleaf-layout-dialect with layout.html decoratorthymeleaf-extras-springsecurity6src/main/resources/templates/src/main/resources/static/ (favicon, CSS, JS)management:
endpoints.web.exposure.include: '*'
endpoint.health.show-details: when_authorized
CommandService implements HealthIndicatorDbActuatorEndpoint for DB infoROLE_ADMIN@EnableWebSecurity + @EnableMethodSecurityDaoAuthenticationProvider with custom AppUserDetailsServiceSimpleAuthorityMapper with uppercase conversion and default ROLE_USER/commands/edit/**, /hosts/edit/**, /actuator/**User → Role → Privilege (many-to-many chain)LoginAttemptService for brute-force protection (block after 5 failures, 600 min)AuthenticationFailureListener / AuthenticationSuccessEventListener@ValidPasswordtelegrambots-springboot-longpolling-starter:9.0.0LongPollingSingleThreadUpdateConsumer interfaceBotStarter handles registration with conditional enablementMockTelegramMessageSender) for testingWebClient with configurable base URLWeatherClientConfig creates WebClient bean with timeoutWeatherService calls API and maps to WeatherResponseScanHostsEventScanHostsEventPublisher + ScanHostsEventListener (async with @EventListener)messages.properties (English) / messages_ru.properties (Russian)CookieLocaleResolver with localeChangeInterceptor (param ?lang=)MessageService / MessageFormatService wrap MessageSourceLocalValidatorFactoryBean with message source for validation i18n@Autowired — always constructor injection@Value or @ConfigurationPropertiesSecurityConfiguration if they need admin protection