Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

all: build

up:
@docker-compose up -d

build:
@./gradlew build --warning-mode all

Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ This is a repository intended to serve as a starting point if you want to bootst
1. Install Java 8: `brew cask install corretto8`
2. Set it as your default JVM: `export JAVA_HOME='/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home'`
3. Clone this repository: `git clone https://github.com/CodelyTV/java-ddd-skeleton`.
4. Execute some [Gradle lifecycle tasks](https://docs.gradle.org/current/userguide/java_plugin.html#lifecycle_tasks) in order to check everything is OK:
4. Bring up the Docker environment: `make up`.
5. Execute some [Gradle lifecycle tasks](https://docs.gradle.org/current/userguide/java_plugin.html#lifecycle_tasks) in order to check everything is OK:
1. Create [the project JAR](https://docs.gradle.org/current/userguide/java_plugin.html#sec:jar): `make build`
2. Run the tests and plugins verification tasks: `make test`
5. Start developing!
6. Start developing!

## ☝️ How to update dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public HibernateRepository(SessionFactory sessionFactory, Class<T> aggregateClas

protected void persist(T entity) {
sessionFactory.getCurrentSession().saveOrUpdate(entity);
sessionFactory.getCurrentSession().flush();
sessionFactory.getCurrentSession().clear();
}

protected Optional<T> byId(Identifier id) {
Expand Down