Skip to main content

Installation Guide

This guide walks you through installing ElastiCORE and configuring your development environment.

System Requirements

Required

  • Java 11 or higher ☕ (Recommended: JDK 17+)
  • Gradle 7.x or higher or Maven 3.6+ 🏗️
  • Spring Boot: 3.x
  • Java 17 or higher
  • Gradle 8.x or higher
  • Spring Boot 3.4 or higher

Installation

1. Create Project

mkdir my-elasticore-project
cd my-elasticore-project
gradle init --type java-application

2. Configure build.gradle

build.gradle
import org.gradle.api.tasks.JavaExec
import org.gradle.jvm.toolchain.JavaLanguageVersion

plugins {
id 'java'
id 'org.springframework.boot' version '3.5.0'
id 'io.spring.dependency-management' version '1.1.7'
}

group = 'com.example.myproject'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
maven { url 'https://repo.spring.io/release' }
}

ext {
set('elcoreVersion', '1.8.250922-SNAPSHOT')
}

dependencies {
// Spring Boot
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'

// ElastiCORE
implementation "io.elasticore:elasticore-base:${elcoreVersion}"
implementation "io.elasticore.springboot3:elasticore-springboot3:${elcoreVersion}"

// Database (H2 for development)
runtimeOnly 'com.h2database:h2'

// Lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

// Test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

// ElastiCORE code generation task
tasks.register('elcore', JavaExec) {
compileJava.enabled = false
classpath = sourceSets.main.runtimeClasspath
mainClass = 'io.elasticore.base.extract.ModelExtractor'
standardInput = System.in

doFirst {
def mode = "default"
project.gradle.startParameter.taskNames.each { taskName ->
if (taskName != "elcore") mode = taskName
}
jvmArgs = ['-Dfile.encoding=UTF-8', "-Dmode=${mode}"]
args "$projectDir/src/main/java"
}
}

gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(elcore)) {
compileJava.enabled = false
} else {
compileJava.enabled = true
}
}

tasks.named('test') {
useJUnitPlatform()
}

Project Structure Setup

1. Create Source Directories

mkdir -p src/main/java/com/example/myproject
mkdir -p src/main/resources/blueprint
mkdir -p src/test/java/com/example/myproject

2. Create Main Application Class

src/main/java/com/example/myproject/Application.java
package com.example.myproject;

import io.elasticore.springboot3.EnableElastiCore;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@EnableElastiCore // Activates ElastiCORE
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

3. Application Configuration

src/main/resources/application.yml
spring:
application:
name: my-elasticore-project
datasource:
url: jdbc:h2:mem:testdb
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
format_sql: true
h2:
console:
enabled: true

server:
port: 8080

logging:
level:
io.elasticore: DEBUG
com.example.myproject: DEBUG

Verify Installation

1. Run ElastiCORE Code Generation

./gradlew elcore

If the model generation starts successfully, you'll see the following output:

  ______  _             _   _ _____  ____  _____  ______ 
| ____|| | | | (_) ___|/ __ \| __ \| ____|
| |__ | | __ _ ___| |_ _ | | | | | | |__) | |__
| __| | | / _` |/ __| __| || | | | | | _ /| __|
| |____|| || (_| |\__ \ |_| || |___| |__| | | \ \| |____
|______||_| \__,_||___/\__|_||_____|\____/|_| \_\______|

ElastiCORE v1.6.7-SNAPSHOT - Ready for code generation!

2. Build the Project

./gradlew build

3. Run the Application

./gradlew bootRun

4. Verify

Open the following URLs in your browser:

Troubleshooting

Common Errors

1. Java Version Error

Error: LinkageError occurred while loading main class

Solution: Ensure you're using Java 17 or higher:

java -version

2. Blueprint Directory Error

ElastiCORE: No blueprint directory found

Solution: Create the src/main/resources/blueprint directory.

Getting Help

If you encounter issues during installation:

  1. Official Documentation: ElastiCORE Docs
  2. Email Support: elasticore@xsolcorpkorea.com

Next Steps

Installation complete? Now create your first project!

➡️ Create Your First Project


💡 Development Tip

For a more comfortable development experience with ElastiCORE:

  • IntelliJ IDEA: Install the Lombok plugin (recommended)
  • VS Code: Install the Java Extension Pack
  • Eclipse: See the Lombok installation guide here