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
spring: | |
data: | |
mongodb: | |
uri: mongodb+srv://${mongo.username}:${mongo.password}@${mongo.cluster}/shopping-list?retryWrites=true&w=majority | |
server: | |
port: 3025 |
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
applications: | |
- name: spring-boot-shopping-list-mongodb | |
memory: 768M | |
random-route: true | |
env: | |
SPRING_PROFILES_ACTIVE: cloud |
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 | |
ARG JAR_FILE=target/*.jar | |
COPY ${JAR_FILE} app.jar | |
ENTRYPOINT ["java","-jar","/app.jar"] |
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 | |
ARG JAR_FILE=target/*.jar | |
COPY ${JAR_FILE} app.jar | |
RUN java -Djarmode=layertools -jar app.jar extract | |
FROM openjdk:15-jdk-slim | |
WORKDIR application | |
COPY --from=bulid application/dependencies/ ./ | |
COPY --from=bulid application/spring-boot-loader/ ./ |
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 |
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
@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
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
server: | |
port: 4024 | |
servlet: | |
context-path: /app | |
spring: | |
application: | |
name: todolist-redis | |
cache: | |
type: redis |
OlderNewer