Java Enums

Enum Example

Enums in if Statements

Enum Iteration

Enum Fields

Enum Methods

References http://tutorials.jenkov.com/java/enums.html https://www.mkyong.com/java/java-enum-example/

Continue reading »

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 […]

Continue reading »

Gradle Task

References https://docs.gradle.org/current/userguide/working_with_files.html https://docs.gradle.org/current/userguide/tutorial_using_tasks.html https://docs.gradle.org/current/userguide/custom_tasks.html https://docs.gradle.org/current/userguide/more_about_tasks.html

Continue reading »

How to use Gradle Wrapper

References https://www.mkyong.com/gradle/how-to-use-gradle-wrapper/ https://docs.gradle.org/current/userguide/gradle_wrapper.html https://docs.gradle.org/current/dsl/org.gradle.api.tasks.wrapper.Wrapper.html

Continue reading »

Run Spring Boot using Gradle plugin

You might also want to use this useful operating system environment variable:

References http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-running-your-application.html#using-boot-running-with-the-gradle-plugin

Continue reading »

Use Jetty instead of Tomcat in Java Spring Boot

Reference http://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-servlet-containers.html#howto-use-jetty-instead-of-tomcat

Continue reading »

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() […]

Continue reading »
1 2 3