Community라이팅 & 에디팅github.com

Spring Bean Factory XML — Dasel v3 질의 패턴

Spring ApplicationContext XML 파일에서 빈 탐색, 의존성 연결, JMS 대상 매핑, 속성 주입 추출 또는 빈 간 참조 추적을 위한 Dasel v3 선택자 패턴입니다. Spring 빈 XML 파일에 대해 Dasel 선택자를 작성하기 전에 이 스킬을 로드하세요.

Spring Bean Factory XML — Dasel v3 질의 패턴란 무엇인가요?

이 기술은 개발자가 Dasel v3를 사용하여 Spring 빈 XML 파일(applicationContext.xml, *_beans.xml, spring-context.xml 등)을 효율적으로 질의할 수 있도록 돕습니다. 빈 탐색, 클래스 패턴 매칭, 의존성 연결 분석, JMS 대상 매핑, 속성 주입 추출, 네임스페이스 처리 및 여러 파일 간 교차 분석을 위한 구체적인 Dasel 선택자 패턴을 제공합니다. 주요 기능으로는 XML 특성에 접근하기 위한 '접두사 규칙'(예: -id, -class), filter 및 map 연산자를 사용한 고급 선택자 패턴, 속성 참조를 통한 빈 간 의존성 추적, ${...} 플레이스홀더 값 추출, 그리고 네임스페이스 접두사로 인한 문제를 해결하기 위한 구조화 모드 처리 등이 있습니다. 모든 예제는 명시적으로 -i xml 플래그를 사용하며, 중간 결과는 항상 /tmp/ 디렉토리에 저장하여 원본 소스 트리를 변경하지 않도록 합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/dasel/skills/enterprise-spring-xml

Installed? Explore more 라이팅 & 에디팅 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Spring Bean Factory XML — Dasel v3 질의 패턴은(는) 무엇을 하나요?

<when_to_use>

이 스킬은 Spring 빈 XML 파일 — applicationContext.xml, *_beans.xml, spring-context.xml 또는 모든 Spring ApplicationContext XML — 을 질의할 때 로드하세요. 빈 탐색, 의존성 분석, JMS 와이어링, 속성 주입 감사 또는 빈 간 참조 추적에 사용됩니다.

</when_to_use>

Spring 빈 팩토리 XML을 위한 Dasel v3 선택자 패턴입니다. 항상 -i xml을 명시적으로 전달하세요.

속성 접두사 규칙: Dasel의 기본 친화 모드(friendly mode)는 XML 속성 앞에 -를 접두사로 붙입니다. id 속성은 -id, class는 -class가 됩니다. 텍스트 내용은 #text입니다.

빈 탐색

# 모든 빈 ID
cat chaosrouter_beans.xml | dasel -i xml 'beans.bean.filter(has("-id")).map("-id")'

# 모든 빈 클래스
cat chaosrouter_beans.xml | dasel -i xml 'beans.bean.filter(has("-class")).map("-class")'

# 모든 빈에 대해 -class 매핑 (-id가 없는 빈 포함)
cat chaosrouter_beans.xml | dasel -i xml 'beans.bean.map("-class")'

클래스 패턴 매칭

-class에 정규표현식을 사용하여 클래스 이름으로 빈을 필터링합니다.

# 클래스에 JmsTemplate이 포함된 빈
cat chaosrouter_beans.xml | dasel -i xml 'beans.bean.filter(-class ~ ".*JmsTemplate.*").map("-id")'

# 클래스 패턴과 일치하는 빈 개수 세기
cat beans.xml | dasel -i xml 'len(beans.bean.filter(-class ~ ".*Jms.*"))'

의존성 연결 분석

property 자식 요소의 -ref 속성을 통해 다른 빈을 참조하는 빈을 찾습니다.

패턴: parentCollection.filter(childElement.filter(condition).len($this) > 0) — 일치하는 자식이 존재하는지(길이 > 0) 테스트하여 부모를 필터링합니다.

# ref 속성을 통해 특정 빈 ID를 참조하는 빈
cat chaosrouter_beans.xml | dasel -i xml 'beans.bean.filter(property.filter(-ref == "targetBeanId").len($this) > 0).map("-id")'

JMS 대상 매핑

property 자식 요소를 통해 어떤 빈이 어떤 JMS 대상을 소비하는지 찾습니다.

# 특정 대상 속성에 연결된 빈
cat integrationpoint_beans.xml | dasel -i xml 'beans.bean.filter(property.filter(-name == "destination").len($this) > 0).map("-id")'

속성 주입 추출

빈 정의에서 외부화된 ${...} 플레이스홀더 값을 추출합니다.

# ${...} 플레이스홀더를 사용하는 모든 속성 값
cat storage_beans.xml | dasel -i xml 'beans.bean.property.filter(-value ~ ".*\\$\\{.*\\}.*").map("-value")'

속성 및 텍스트 내용 접근

# <bean id="myBean" class="com.example.Foo">some text</bean>
cat beans.xml | dasel -i xml 'beans.bean[0].-id'       # myBean
cat beans.xml | dasel -i xml 'beans.bean[0].-class'    # com.example.Foo
cat beans.xml | dasel -i xml 'beans.bean[0].#text'     # some text

# 첫 번째 빈의 모든 키(속성 + 자식 요소) 확인
cat beans.xml | dasel -i xml 'beans.bean[0].keys($this)'

네임스페이스 처리

친화 모드는 요소 이름에서 네임스페이스 접두사를 제거합니다. 대부분의 Spring 질의에서 작동합니다.

네임스페이스 접두사로 인해 선택자가 실패하는 경우(요소가 존재하지만 찾을 수 없음) 구조화 모드로 전환하세요:

cat spring-context.xml | dasel -i xml --read-flag xml-mode=structured 'beans.bean[0]'

파일 간 분석

중간 결과는 항상 /tmp/에 기록하세요. 소스 트리에 절대 기록하지 마십시오.

# 여러 파일에서 빈 ID 추출 후 비교
cat chaosrouter_beans.xml | dasel -i xml 'beans.bean.filter(has("-id")).map("-id")' > /tmp/chaosrouter_beans.txt
cat integrationpoint_beans.xml | dasel -i xml 'beans.bean.filter(has("-id")).map("-id")' > /tmp/integration_beans.txt
diff /tmp/chaosrouter_beans.txt /tmp/integration_beans.txt

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Jamie-BitFlight/agentskill-kaizen-meta-docs

Agentskill kaizen plugin documentation index. Load when needing to read about cross-platform notes, improvement plans, or DuckDB integration.

Jamie-BitFlight/bash-51-features

Bash 5.1 release features and improvements with practical examples. Use when working with Bash 5.1 features, epoch time variables, redirection enhancements, or when user asks about Bash 5.1 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-52-features

Bash 5.2 release features and improvements with practical examples. Use when working with Bash 5.2 features, variable handling enhancements, readline improvements, or when user asks about Bash 5.2 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-53-features

Bash 5.3 release features and improvements with practical examples. Use when working with Bash 5.3 features, new command substitution, GLOBSORT, loadable builtins, or when user asks about Bash 5.3 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-development

This skill should be used when the user asks to "write a bash script", "create a shell script", "implement bash function", "parse arguments in bash", "handle errors in bash", or mentions bash development, shell scripting, script templates, or modern bash patterns.

Jamie-BitFlight/bash-lint

This skill should be used when the user asks to "lint bash script", "run shellcheck", "format shell script", "use shfmt", "fix shellcheck errors", or mentions shell script linting, formatting, code quality, or pre-commit hooks for bash.

Jamie-BitFlight/bash-logging

This skill should be used when the user asks to "add logging to bash script", "colorize output", "implement log levels", "CI/CD sections", "terminal colors in bash", or mentions logging functions, emoji output, collapsible CI sections, or shlocksmith.

Jamie-BitFlight/bash-portability

This skill should be used when the user asks about "POSIX compatibility", "portable shell scripts", "cross-shell compatibility", "bashisms", "shebang selection", or mentions writing scripts that work on different shells (bash, sh, dash, zsh) or different systems.

Jamie-BitFlight/bash-testing

This skill should be used when the user asks to "test bash script", "write shell tests", "use shunit2", "use shellspec", "create test suite for bash", or mentions unit testing, test frameworks, mocking, or test-driven development for shell scripts.

Jamie-BitFlight/brainstorming-skill

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or when users request help with ideation, marketing, and strategic planning. Explores user intent, requirements, and design before implementation using research-validated prompt patterns.

Jamie-BitFlight/clang-format

Configure clang-format code formatting. Use when: user mentions clang-format or .clang-format, analyzing code style/patterns, creating/modifying formatting config, troubleshooting formatting, brace styles/indentation/spacing/alignment/pointer alignment, or codifying conventions.

Jamie-BitFlight/commitlint

When setting up commit message validation for a project. When project has commitlint.config.js or .commitlintrc files. When configuring CI/CD to enforce commit format. When extracting commit rules for LLM prompt generation. When debugging commit message rejection errors.

Jamie-BitFlight/conventional-commits

When writing a git commit message. When task completes and changes need committing. When project uses semantic-release, commitizen, git-cliff. When choosing between feat/fix/chore/docs types. When indicating breaking changes. When generating changelogs from commit history.

Jamie-BitFlight/dasel-reference

Use when querying, modifying, or converting JSON, YAML, TOML, XML, CSV, HCL, or INI with dasel v3. Complete reference for selectors, functions, conditionals, variables, spread operator, type casting, and format-specific patterns.

Jamie-BitFlight/data-exploration

Use when exploring unknown structured data files with dasel v3 — discover schema, list keys, find nested values, sample arrays, identify data types across JSON, YAML, TOML, XML, CSV, HCL, INI formats

Jamie-BitFlight/data-transformation

Use when modifying, converting, or transforming structured data with dasel v3 — in-place mutations, format conversion, batch operations, array manipulation, object construction, and merge patterns across JSON, YAML, TOML, XML, CSV, HCL, INI

Jamie-BitFlight/delegate

Decompose substantive work into phases, dispatch each phase to a sub-agent, and adjudicate what comes back. Use whenever a request asks for implementation, investigation, a fix, a review, or any change to files — including small ones — and whenever you are about to read source or run a diagnostic yourself instead of handing it off. Also use when a report from a sub-agent needs judging, when a phase needs re-dispatching, or when a user names one instance of a pattern. Does not apply when your own prompt begins "Your ROLE_TYPE is sub-agent." — then follow references/sub-agent-contract.md instead.

Jamie-BitFlight/enterprise-hibernate-hbm

Dasel v3 query patterns for Hibernate .hbm.xml mapping files — entity-table binding, Java property-to-column extraction, one-to-many set/list/bag relationship tracing, many-to-one foreign key discovery, batch scanning across 60+ HBM files. Use when querying Hibernate ORM class mappings, extracting schema metadata from Java persistence layer, or auditing entity-column relationships in enterprise legacy codebases.

Jamie-BitFlight/enterprise-installanywhere

Dasel v3 query patterns for InstallAnywhere .iap_xml installer definitions — use when querying action sequences, discovering variables, resolving platform conditions, navigating panels, or comparing installer variants. Files are 2.5+ MB, 65,000+ lines — too large for context reads, requires structural dasel queries.

Jamie-BitFlight/enterprise-maven-pom

Dasel v3 selector patterns for Maven POM XML files — use when querying dependency versions, filtering by groupId or scope, extracting module hierarchy from parent POMs, or detecting version conflicts across enterprise multi-module Java projects. Load this skill when working with pom.xml files using dasel.

관련 스킬