Skip to main content
Frameworks

Spring Boot .gitignore

.gitignore for frameworks projects

View on GitHub

.gitignore Content

# ============================================================================
# Created by https://gitignores.com/
# COMPREHENSIVE FRAMEWORK TEMPLATE for Spring Boot
# Website: https://spring.io/projects/spring-boot
# Repository: https://github.com/spring-projects/spring-boot
# ============================================================================

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE OVERVIEW & USAGE NOTES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# • TEMPLATE TYPE: COMPREHENSIVE FRAMEWORK TEMPLATE
# • PURPOSE: Complete Spring Boot framework patterns for Java web applications and build artifacts
# • DESIGN PHILOSOPHY: Comprehensive and self-contained with all necessary patterns
# • COMBINATION GUIDANCE: Can be used standalone or combined with IDE/OS templates
# • SECURITY CONSIDERATIONS: Includes comprehensive security patterns for sensitive data protection
# • BEST PRACTICES: Use as standalone template, review security patterns, test with your setup
# • OFFICIAL SOURCES: Spring Boot documentation and community best practices

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# SECURITY & SENSITIVE DATA PROTECTION (ALWAYS FIRST!)
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# CRITICAL: Protect sensitive data from accidental commits to version control

*.crt
*.key
*.keystore
*.pem
*.secret
*.token
*_keys
*_secrets
*_tokens
.env
.env.*
.env.*.local
.env.demo
.env.demo.local
.env.development
.env.development.local
.env.local
.env.production
.env.production.local
.env.qa
.env.qa.local
.env.staging
.env.staging.local
.env.test
.env.test.local
id_dsa
id_rsa

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# BUILD ARTIFACTS & DISTRIBUTION PACKAGES
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.dll
*.ear
*.exe
*.jar
*.lib
*.tar.gz
*.war
*.whl
*.zip

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEPENDENCY MANAGEMENT & PACKAGE CACHE
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

**/target/
.cache/
.gradle/
.mvn/
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
build/
buildNumber.properties
target/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# DEVELOPMENT & RUNTIME ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

*.log
*.log.*
.mtj.tmp/
.parcel-cache/
.pnpm-debug.log*
.rpt2_cache/
logs/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# SPRING BOOT-SPECIFIC PATTERNS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

!gradle/wrapper/gradle-wrapper.jar
**/application-*.properties
**/application-*.yml
**/application.properties
**/application.yml
**/test-output/
*.cer
*.class
*.csr
*.ctxt
*.der
*.jks
*.nar
*.nupkg
*.o
*.obj
*.p12
*.p7b
*.p7c
*.pfx
*.pid
*.pid.lock
*.pub
*.rar
*.tgz
*.truststore
.docusaurus
.DS_Store
.DS_Store?
.factorypath
.fleet/
.fusebox/
.next/
.nova/
.nuxt/
.parcel-cache
.pnp.*
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
.serverless/
.Spotlight-V100
.spring-devtools.properties
.storybook-out/
.stylelintcache
.Trashes
.vscode-test/
bower_components/
cover/
dependency-reduced-pom.xml
heapdump.hprof
hs_err_pid*
jspm_packages/
out/
pom.xml.next
pom.xml.releaseBackup
pom.xml.tag
pom.xml.versionsBackup
public/
release.properties
storybook-static/
test-output/
test-reports/
testng-results.xml
Thumbs.db
web_modules/

# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
# TESTING & QUALITY ASSURANCE ARTIFACTS
# ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

**/test-results/
.coverage
.coverage.*
.coverage.xml
.coverage_html/
.nyc_output/
htmlcov/
junit.xml
test-results/

# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# TEMPLATE CUSTOMIZATION & BEST PRACTICES
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 1. REVIEW: Examine all patterns before use
# 2. CUSTOMIZE: Adapt to your project's specific structure
# 3. TEST: Use `git check-ignore` to verify patterns work correctly
# 4. SECURE: Always protect sensitive data and credentials
# 5. UPDATE: Review periodically as technology evolves

# For comprehensive coverage, this template can be used standalone.
# Optionally combine with IDE/OS templates if needed:

# EXAMPLE USAGE FOR SPRING BOOT PROJECT:
# cp frameworks/spring-boot.gitignore .gitignore

Note: This file is fetched from GitHub and cached for 7 days.