Skip to content

Instantly share code, notes, and snippets.

View avinash10584's full-sized avatar
🏠
Working from home

Avinash Singh avinash10584

🏠
Working from home
View GitHub Profile
@avinash10584
avinash10584 / Application.java
Created June 19, 2020 16:01
Application.java
@EnableCaching
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
@avinash10584
avinash10584 / application-cluster.yml
Created June 19, 2020 05:47
application-cluster.yml
server:
port: 4024
servlet:
context-path: /app
spring:
application:
name: todolist-redis
cache:
type: redis
@avinash10584
avinash10584 / application-sentinel.yml
Created June 18, 2020 21:23
application-sentinel.yml
server:
port: 4024
servlet:
context-path: /app
spring:
application:
name: todolist-redis
cache:
type: redis
@avinash10584
avinash10584 / application-cluster.yml
Created June 18, 2020 16:03
application-cluster.yml
server:
port: 4024
servlet:
context-path: /app
spring:
application:
name: todolist-redis
cache:
type: redis
@avinash10584
avinash10584 / application-cluster.yml
Created June 17, 2020 22:19
application-cluster.yml
server:
port: 4024
servlet:
context-path: /app
spring:
application:
name: todolist-redis
cache:
type: redis
@avinash10584
avinash10584 / TodoListController.java
Created June 17, 2020 20:25
TodoListController.java
package com.codingfullstack.springboot.redis.rest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Optional;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.Caching;
@avinash10584
avinash10584 / TodoListController.java
Created June 14, 2020 06:27
TodoListController.java
@RestController("/")
public class TodoListController {
private ToDoList sample = new ToDoList(1, Arrays.asList(new ToDo(1, "Comment", false), new ToDo(2, "Clap", false),
new ToDo(3, "Follow Author", false)), false);
@GetMapping
public ToDoList getList() {
return sample;
}
@avinash10584
avinash10584 / TodoListController.java
Created June 14, 2020 06:20
TodoListController.java
@RestController("/")
public class TodoListController {
private ToDoList sample = new ToDoList(1, Arrays.asList(new ToDo(1, "Comment", false),
new ToDo(2, "Clap", false),
new ToDo(3, "Follow Author", false)), false);
@GetMapping
public ToDoList getList() {
return sample;
# syntax = docker/dockerfile:experimental
FROM openjdk:15-jdk-slim as bulid
WORKDIR application
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY src src
FROM openjdk:15-jdk-slim as bulid
WORKDIR application
COPY mvnw .
COPY .mvn .mvn
COPY pom.xml .
COPY src src
RUN ./mvnw install -DskipTests