Java Enums

Enum Example

Enums in if Statements

Enum Iteration

Enum Fields

Enum Methods


Read More

Spring Data MongoDB – Indexes, Annotations and Converters

Indexed This annotation marks the field as indexed in MongoDB

Compound Indexes MongoDB supports compound indexes, where a single index structure holds references to multiple fields.

Transient As you would expect, this simple annotation excludes the field from being persisted in the database.

Field @Field indicates the …

Read More

Gradle Task


Read More

How to use Gradle Wrapper


Read More

Use Jetty instead of Tomcat in Java Spring Boot


Read More

Spring Data MongoDB : Query document

Test Data

BasicQuery example

findOne example

find and $inc example

find and $gt, $lt, $and example

You can’t use Criteria.and() to add multiple criteria into the same field, to fix it, use Criteria.andOperator(), see updated example :

find and sorting example

find and …

Read More