skip to Main Content

Docker doesn't create database

I have Dockerfile: FROM postgres ENV POSTGRES_USER root ENV POSTGRES_PASSWORD root ENV POSTGRES_DB world COPY world.sql /docker-entrypoint-initdb.d/ I run docker build -t postgres, then I create container but it doesn't create database in PG. Does anyone have any idea? world.sql…

VIEW QUESTION

Android Studio – How to receive the message from stomp websocket with spring boot on android?

I've got the simple WebSocket example from https://spring.io/guides/gs/messaging-stomp-websocket/ package com.example.chatservice.message; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer; @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { @Override public void configureMessageBroker(MessageBrokerRegistry config) { config.enableSimpleBroker("/topic"); config.setApplicationDestinationPrefixes("/app"); } @Override public void…

VIEW QUESTION

How to mock HashOperations of Spring StringRedisTemplate?

I'm writing unit test for my CacheService class: public class CacheService { private final HashOperations<String, String, String> redisHashOps; private final ValueOperations<String, String> valueOps; private final SetOperations<String, String> setOps; public CacheService(StringRedisTemplate redisTemplate) { this.redisHashOps = redisTemplate.opsForHash(); this.valueOps = redisTemplate.opsForValue(); this.setOps =…

VIEW QUESTION

Spring Boot Redis Cache remove cache with multiple key

I have a method that saves cache. @GetMapping("/orders") @Cacheable(value = "List<Order>", key = "{#customerName+'s orders', #page, #size}") public List<Order> findOrders(@RequestParam("customerName") String customerName, @RequestParam(name = "page") int page, @RequestParam(name = "size") int size) { ... And I want to remove this…

VIEW QUESTION
Back To Top
Search