title |
---|
Elements of Messaging and Eventing Platforms |
This document provides a brief overview of the essential elements of a messaging and eventing platform and how they relate to each other.
package br.com.zup.edu.livraria; | |
import org.springframework.boot.test.autoconfigure.web.servlet.MockMvcBuilderCustomizer; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.core.authority.SimpleGrantedAuthority; | |
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; | |
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; | |
import org.springframework.test.web.servlet.setup.ConfigurableMockMvcBuilder; | |
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.jwt; |
package br.com.zup.edu.minhasfigurinhas; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | |
import static org.springframework.http.HttpMethod.GET; | |
import static org.springframework.http.HttpMethod.POST; | |
import static org.springframework.security.config.http.SessionCreationPolicy.STATELESS; |
@Entity | |
public class Album { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private Long id; | |
@Size(min = 1) | |
@OneToMany(cascade = { |
## | |
# 1. run theses commands on PowerShell as admin | |
# 2. restart windows | |
## | |
wsl --shutdown | |
netsh winsock reset | |
netsh int ip reset all | |
netsh winhttp reset proxy | |
ipconfig /flushdns |
title |
---|
Elements of Messaging and Eventing Platforms |
This document provides a brief overview of the essential elements of a messaging and eventing platform and how they relate to each other.
import com.google.common.cache.Cache; | |
import com.google.common.cache.CacheBuilder; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.annotation.PostConstruct; | |
import java.util.Optional; | |
import java.util.concurrent.TimeUnit; | |
public class CacheStore { |
Material de suporte rápido para conhecer e setar parâmetros de JVM mais comuns relacionados a propriedades da JVM, configuração de frameworks e libs, aplicação e tuning de memória heap e metaspace, além da definição do algoritimo de GC e algumas configurações para troubleshooting.
Todos os comandos aqui são executados via linha de comando, mas podem ser definidos na sua IDE, variável de ambiente (JAVA_OPTS
) ou no seu servidor de integração contínua (CI).
Rodando uma aplicação (jar):
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.dao.DataAccessException; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.web.bind.annotation.ExceptionHandler; | |
import org.springframework.web.bind.annotation.RestControllerAdvice; | |
import org.springframework.web.context.request.WebRequest; | |
import java.time.LocalDateTime; | |
import java.util.Map; |
@Entity | |
class Proposal( | |
val name: String, | |
// | |
@Column(columnDefinition = "binary(16)") // this works but uses a MySQL's specific type | |
val customerId: UUID | |
) { | |
@Id | |
@GeneratedValue |