This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EnableCaching | |
@SpringBootApplication | |
public class Application { | |
public static void main(String[] args) { | |
SpringApplication.run(Application.class, args); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 4024 | |
servlet: | |
context-path: /app | |
spring: | |
application: | |
name: todolist-redis | |
cache: | |
type: redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 4024 | |
servlet: | |
context-path: /app | |
spring: | |
application: | |
name: todolist-redis | |
cache: | |
type: redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 4024 | |
servlet: | |
context-path: /app | |
spring: | |
application: | |
name: todolist-redis | |
cache: | |
type: redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
port: 4024 | |
servlet: | |
context-path: /app | |
spring: | |
application: | |
name: todolist-redis | |
cache: | |
type: redis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax = docker/dockerfile:experimental | |
FROM openjdk:15-jdk-slim as bulid | |
WORKDIR application | |
COPY mvnw . | |
COPY .mvn .mvn | |
COPY pom.xml . | |
COPY src src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM openjdk:15-jdk-slim as bulid | |
WORKDIR application | |
COPY mvnw . | |
COPY .mvn .mvn | |
COPY pom.xml . | |
COPY src src | |
RUN ./mvnw install -DskipTests |
NewerOlder