Giter Site home page Giter Site logo

springboot-tutorial's Introduction

SpringBoot Tutorial

Java Maven CI

Videos Available here

All the tutorial videos are available on Saggu.uk YouTube channel.

Watch the video

Spring Profiles

How to run using a profile?

mvn spring-boot:run -DskipTests -Dspring-boot.run.profiles={Profile-Name}

e.g. For Dev

mvn spring-boot:run -DskipTests -Dspring-boot.run.profiles={Profile-Name}

e.g. Different Port

mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8080
mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8090

or

mvn clean install -DskipTests
java -jar target/springboot-tutorial-0.0.1-SNAPSHOT.jar --server.port=8080 --management.server.port=9090

Spring Caching

Note: Just enable one cache provider

Redis

Dependency
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
    <version>${cache.version}</version>
</dependency>
application.yml

Add the following:

spring:
  cache:
    redis:
      time-to-live: 100S
    type: redis
How to install Redis using Docker?
  • docker pull redis
  • docker run --name saggu.uk -p 6379:6379 -d redis

Hazelcast

Dependency
<dependency>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-all</artifactId>
    <version>4.2.4</version>
</dependency>
Add hazelcast.yaml
hazelcast:
  network:
    join:
      multicast:
        enabled: true

springboot-tutorial's People

Contributors

jasvinder-saggu avatar dependabot[bot] avatar jssaggu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.