Development Environment Setup
A guide for configuring IDEs and development tools for efficient ElastiCORE Spring Boot development.
IDE Setup
IntelliJ IDEA (Recommended)
Required Plugins
- Lombok - Boilerplate code auto-generation
- YAML/Ansible support - YAML syntax highlighting and auto-completion
- Database Navigator - Database management and query execution
- Spring Boot - Spring Boot project support
File → Settings → Plugins → Marketplace → Search and install
Enable Annotation Processing
Annotation processing must be enabled for ElastiCORE code generation:
File → Settings → Build, Execution, Deployment → Compiler → Annotation Processors
✓ Enable annotation processing
✓ Obtain processors from project classpath
VS Code
Required Extensions
.vscode/extensions.json
{
"recommendations": [
"vscjava.vscode-java-pack",
"redhat.vscode-yaml",
"pivotal.vscode-spring-boot",
"gabrielbb.vscode-lombok"
]
}
Recommended Project Structure
my-elasticore-project/
├── src/
│ ├── main/
│ │ ├── java/com/example/myproject/
│ │ │ ├── Application.java # @EnableElastiCore required
│ │ │ ├── config/ # Spring configuration classes
│ │ │ ├── domain/ # Generated domain code
│ │ │ │ ├── entity/
│ │ │ │ ├── dto/
│ │ │ │ ├── repository/
│ │ │ │ └── service/
│ │ │ └── custom/ # Custom business logic
│ │ └── resources/
│ │ ├── blueprint/ # ElastiCORE DSL definitions
│ │ │ ├── env.yml
│ │ │ └── models.yml
│ │ ├── application.yml
│ │ └── application-dev.yml
│ └── test/java/ # Unit tests
├── docs/ # Project documentation
└── build.gradle
Spring Boot Configuration
Development Environment
application-dev.yml
spring:
datasource:
url: jdbc:h2:mem:devdb;DB_CLOSE_DELAY=-1
driver-class-name: org.h2.Driver
username: sa
password:
h2:
console:
enabled: true
path: /h2-console
jpa:
hibernate:
ddl-auto: update
show-sql: false
properties:
hibernate:
format_sql: true
default_batch_fetch_size: 100
devtools:
restart:
enabled: true
additional-paths: src/main/resources/blueprint
logging:
level:
io.elasticore: DEBUG
org.springframework.web: INFO
management:
endpoints:
web:
exposure:
include: health,info,metrics
Production Environment
application-prod.yml
spring:
datasource:
url: ${DB_URL:jdbc:postgresql://localhost:5432/myproject}
username: ${DB_USERNAME:myproject}
password: ${DB_PASSWORD}
driver-class-name: org.postgresql.Driver
hikari:
maximum-pool-size: 20
jpa:
hibernate:
ddl-auto: none # Manual schema management in production
show-sql: false
logging:
level:
root: INFO
io.elasticore: INFO
Development Workflow
Standard Development Process
# 1. Generate ElastiCORE code
./gradlew elcore
# 2. Run the application (dev mode)
./gradlew bootRun
# 3. When blueprint files change, regenerate:
./gradlew elcore
./gradlew compileJava
Troubleshooting
1. Code Generation Not Working
# Solutions:
# 1. Verify @EnableElastiCore annotation on Application class
# 2. Check blueprint directory path (src/main/resources/blueprint)
# 3. Clean and regenerate: ./gradlew clean elcore
2. Hot Reload Not Working
# Solutions:
# 1. Verify spring-boot-devtools dependency
# 2. Enable auto-build in IDE (IntelliJ: Build project automatically)
# 3. Check devtools settings in application-dev.yml
Next Steps
With your development environment ready:
- Basic Concepts - Understand ElastiCORE core concepts
- First Project - Hands-on tutorial
- DSL Reference - Complete YAML syntax guide
Development Tips
- IDE shortcuts: Navigate quickly between blueprint files and generated code
- Automation scripts: Automate repetitive development tasks
- Git hooks: Verify code generation state before commits
- Team settings: Include .editorconfig and IDE settings in the repository
Caution
- Don't modify generated code directly: It will be overwritten on the next build. Use extension patterns instead.
- Back up blueprint files: Manage important model definitions with Git version control.
- Separate environment configs: Clearly separate dev/test/production environment settings.