# 全工程 BOM 扫描(AGENTS.md:批量编辑 .java 后、mvn compile 前必跑) $hits = Get-ChildItem -Path 'd:\code\crm-backend-matt' -Recurse -Filter *.java | Where-Object { $_.FullName -notmatch '\\target\\' } | Where-Object { $b = [IO.File]::ReadAllBytes($_.FullName) $b.Length -ge 3 -and $b[0] -eq 0xEF -and $b[1] -eq 0xBB -and $b[2] -eq 0xBF } if ($hits) { $hits | ForEach-Object { Write-Output ("BOM: " + $_.FullName) } } else { Write-Output "BOM files: 0" }