Skip to content

Instantly share code, notes, and snippets.

View giuliana-bezerra's full-sized avatar
👩‍🎓
Always Learning

Giuliana Silva Bezerra giuliana-bezerra

👩‍🎓
Always Learning
View GitHub Profile
@giuliana-bezerra
giuliana-bezerra / DemoApplication.java
Created May 20, 2023 15:20
Application with bug which will be fixed by ChatGPT.
package com.example.demo;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
/*
* Projeto elaborado no vídeo do Youtube da série Fundamentos do Java: https://youtu.be/hyqgGPqHuKg
* Assunto: Tipos primitivos no Java
*/
public class App {
public static void main(String[] args) {
// Tipos numéricos inteiros - byte, short, int, long
// int numero1 = 1;
// int numero2 = 2;
// int soma = numero1 + numero2;
swagger: '2.0'
info:
title: TODO List
description: API de gerenciamento de tarefas.
version: '1.0.0'
schemes:
- https
basePath: /v1
produces:
- application/json
@giuliana-bezerra
giuliana-bezerra / Funcionarios.yaml
Created September 21, 2021 14:26
API de funcionários para testar a configuração do CORS no WSO2 Microgateway.
---
openapi: 3.0.0
servers:
- url: http://localhost:8080
info:
description: 'API de funcionarios para testes de CORS.'
version: 1.0.0
title: Funcionarios
x-wso2-basePath: /api/v1
x-wso2-production-endpoints: '#/x-wso2-endpoints/dev'
@giuliana-bezerra
giuliana-bezerra / Petstore_Parametros.yaml
Last active September 20, 2021 17:37
API da Petstore com parâmetros para modificar endpoints de acordo com o ambiente.
---
openapi: 3.0.0
servers:
- url: https://petstore.swagger.io/v2
- url: http://petstore.swagger.io/v2
info:
description:
'This is a sample server Petstore server. You can find out more about
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For
this sample, you can use the api key `special-key` to test the authorization filters.'
@giuliana-bezerra
giuliana-bezerra / Petstore_Autenticacao_Basica.yaml
Created September 15, 2021 18:27
Definição de autenticação básica no endpoint do contrato do WSO2 Microgateway.
---
openapi: 3.0.0
servers:
- url: https://petstore.swagger.io/v2
- url: http://petstore.swagger.io/v2
info:
description: 'This is a sample server Petstore server. You can find out more about
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For
this sample, you can use the api key `special-key` to test the authorization filters.'
version: 1.0.0
@giuliana-bezerra
giuliana-bezerra / Petstore_API_Key.yaml
Created September 15, 2021 17:45
Petstore com API Key configurado para o WSO2 Microgateway.
---
openapi: 3.0.0
servers:
- url: 'https://petstore3.swagger.io/api/v3'
info:
description:
'This is a sample server Petstore server. You can find out more about
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For
this sample, you can use the api key `special-key` to test the authorization filters.'
version: 1.0.0
---
openapi: 3.0.0
servers:
- url: 'https://petstore3.swagger.io/api/v3'
info:
description:
'This is a sample server Petstore server. You can find out more about
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For
this sample, you can use the api key `special-key` to test the authorization filters.'
version: 1.0.0
---
openapi: 3.0.0
servers:
- url: 'https://petstore3.swagger.io/api/v3'
info:
description:
'This is a sample server Petstore server. You can find out more about
Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For
this sample, you can use the api key `special-key` to test the authorization filters.'
version: 1.0.0
@Configuration
public class CompositeReaderConfig {
@Bean
public ItemReader<CustomerAccount> compositeReader(DataSource customerDS,
@Qualifier("accountDataSource") DataSource accountDS, PagingQueryProvider queryProvider) {
CompositeJdbcPagingItemReader<CustomerAccount> reader = new CompositeJdbcPagingItemReader<>();
reader.setDataSource(accountDS);
reader.setPageSize(10);
reader.setQueryProvider(queryProvider);
reader.setRowMapper(new BeanPropertyRowMapper<>(CustomerAccount.class));