This file contains 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.mih.playground.driver; | |
import com.datastax.driver.core.utils.UUIDs; | |
import com.mih.playground.Infrastructure; | |
import org.junit.jupiter.api.Assertions; | |
import org.junit.jupiter.api.Test; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.autoconfigure.data.cassandra.DataCassandraTest; | |
import org.springframework.context.annotation.Import; |
This file contains 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.mih.playground; | |
import org.springframework.boot.test.context.TestConfiguration; | |
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Import; | |
import org.testcontainers.containers.CassandraContainer; | |
import org.testcontainers.containers.KafkaContainer; | |
import org.testcontainers.utility.DockerImageName; |
This file contains 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.mih.playground.driver; | |
import com.datastax.driver.core.utils.UUIDs; | |
import com.mih.playground.Infrastructure; | |
import org.junit.jupiter.api.BeforeAll; | |
import org.junit.jupiter.api.Test; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.autoconfigure.data.cassandra.DataCassandraTest; | |
import org.springframework.boot.testcontainers.service.connection.ServiceConnection; | |
import org.springframework.context.annotation.Bean; |
This file contains 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.mih.playground.driver; | |
import org.springframework.data.cassandra.repository.CassandraRepository; | |
import org.springframework.stereotype.Repository; | |
import java.util.UUID; | |
@Repository | |
public interface DriverRepository extends CassandraRepository<Driver, UUID> { | |
} |
This file contains 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.mih.playground.driver; | |
import org.springframework.data.cassandra.core.mapping.PrimaryKey; | |
import org.springframework.data.cassandra.core.mapping.Table; | |
import java.time.ZonedDateTime; | |
import java.util.UUID; | |
@Table | |
public class Driver { |
This file contains 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.mih.webauthn.demo.file; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.core.io.FileSystemResource; | |
import org.springframework.stereotype.Service; | |
import java.io.IOException; | |
import java.nio.file.*; |
This file contains 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.mih.webauthn.demo.file; | |
import com.mih.webauthn.demo.sse.SseTemplate; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Service; | |
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; | |
import java.io.IOException; | |
import java.nio.file.Files; |
This file contains 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.mih.webauthn.demo.sse; | |
import org.springframework.stereotype.Service; | |
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Optional; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.util.concurrent.CopyOnWriteArrayList; |
This file contains 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
@Override | |
public Object invoke(MethodInvocation invocation) throws Throwable { | |
//... | |
CompletableFutureCacheableEvict evictAnnotation = invocation.getMethod().getAnnotation(CompletableFutureCacheableEvict.class); | |
//... | |
return callMethod(invocation) | |
.thenApply(newValue -> { |
This file contains 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.mihaita.articles.caching; | |
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.extension.ExtendWith; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.context.SpringBootTest; | |
import org.springframework.test.context.junit.jupiter.SpringExtension; |
NewerOlder