I want my Spring Boot application to run on other computers with the example data that I enter. Currently, I can exit the IDE and restart the application and it works fine, but as soon as I upload my project for my colleagues to download, they do not have any data they can access. How can I implement the function that I can upload the project and everyone using the application can access the test data that I have entered before?
My application.properties in the main folder:
spring.h2.console.enabled=true
spring.h2.console.path=/h2
spring.datasource.url=jdbc:h2:~/spring-boot-h2-db;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.hibernate.ddl-auto=update
My build.gradle:
plugins {
id 'org.springframework.boot' version '2.1.3.RELEASE'
id 'java'
}
apply plugin: 'io.spring.dependency-management'
group = 'de.hsba.bi.traveldiary'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'com.h2database:h2'
implementation 'org.springframework.boot:spring-boot-devtools'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect:2.3.0'
implementation 'org.springframework.boot:spring-boot-starter-web-services'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
runtime 'com.h2database:h2'
}
Thanks a lot in advance!