🙇♂️
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 dev.tpcoder.bffjav.config; | |
import dev.tpcoder.bffjav.client.DriverClient; | |
import dev.tpcoder.bffjav.client.LocationClient; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.messaging.rsocket.RSocketRequester; | |
import org.springframework.messaging.rsocket.service.RSocketServiceProxyFactory; | |
import org.springframework.web.service.invoker.HttpClientAdapter; | |
import org.springframework.web.service.invoker.HttpServiceProxyFactory; |
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 dev.tpcoder.bffjav.config; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.http.HttpStatusCode; | |
import org.springframework.http.codec.cbor.Jackson2CborDecoder; | |
import org.springframework.http.codec.cbor.Jackson2CborEncoder; | |
import org.springframework.messaging.rsocket.RSocketRequester; |
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 dev.tpcoder.location | |
import org.slf4j.LoggerFactory | |
import org.springframework.messaging.handler.annotation.* | |
import org.springframework.stereotype.Controller | |
import reactor.core.publisher.Flux | |
import java.time.Duration | |
@Controller | |
class LocationController { |
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 dev.tpcoder.driver | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.asFlow | |
import org.slf4j.LoggerFactory | |
import org.springframework.http.HttpStatus | |
import org.springframework.http.MediaType | |
import org.springframework.http.codec.multipart.FilePart | |
import org.springframework.stereotype.Controller | |
import org.springframework.util.MultiValueMap |
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 org.doc2pdf.lambda; | |
import java.awt.image.BufferedImage; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import javax.imageio.ImageIO; |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.5.0; | |
contract Bank { | |
// Dictionary that maps address to balances | |
mapping (address => uint256) private balances; | |
// Users in the system | |
address[] accounts; |
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
import java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.time.temporal.ChronoUnit; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.convert.converter.Converter; | |
import org.springframework.data.convert.ReadingConverter; |
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
@Component | |
public class CronScheduler { | |
private final Logger logger = LoggerFactory.getLogger(CronScheduler.class); | |
@Scheduled(cron = "${cron.expression}") | |
public void cronScheduleTask() { | |
logger.info("schedule tasks using cronScheduleTask - {}", ZonedDateTime.now()); | |
} | |
} |
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
@Component | |
public class FixedDelayScheduler { | |
private final Logger logger = LoggerFactory.getLogger(FixedDelayScheduler.class); | |
@Scheduled(fixedDelay = 10000) | |
public void fixedDelayScheduleTask() { | |
logger.info("schedule tasks using fixedDelayScheduleTask - {}", ZonedDateTime.now()); | |
} |