I'm a Backend and Mobile Developer.
I really enjoy data structure and algorithms, math, physics and challenging things.
API de Resultados das Loterias CAIXA
Home Page: https://loteriascaixa-api.herokuapp.com
Guto, Bom dia!!
Primeiramente eu gostaria de lhe parabenizar pela api super bem desenvolvida um excelente trabalho!
Outro ponto hoje quando fui autualizar a mesma, notei que não esão trazendo os jogos de ontem. Será que houve algum problema com a Caixa?
Print of the Warning Exception
2024-07-10 21:30:34.727 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.739 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.777 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.847 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.857 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.870 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.875 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
2024-07-10 21:30:34.880 WARN 492462 --- [ restartedMain] s.d.s.p.CachingModelPropertiesProvider : Exception calculating properties for model(com.gutotech.loteriasapi.model.Estado) -> ModelContext{groupName=default, type=com.gutotech.loteriasapi.model.Estado, isReturnType=true, view=Optional.empty}. Duplicate key nome (attempted merging values [Property 'NomeEstado'; ctors: null, field(s): null, getter(s): null, setter(s): [method com.gutotech.loteriasapi.model.Estado#setNome(1 params)][visible=true,ignore=false,explicitName=true]] and [Property 'nome'; ctors: null, field(s): null, getter(s): [method com.gutotech.loteriasapi.model.Estado#getNome(0 params)][visible=true,ignore=false,explicitName=true], setter(s): null])
Boa Tarde!
Muita boa sua API de resultados.
Você irá atualizar para colocar a +Milionária?
Obrigado
Bom dia, não sei se o problema é na api desenvolvida (mto boa por sinal) mas estou tentando consultá-la em 27/11/2021 as 11:11 da manhã no link https://loterias-gutotech.herokuapp.com/api/v0/megasena/1 e recebo o seguinte erro:
<title>No such app</title> <style media="screen"> html, body, iframe { margin: 0; padding: 0; } html,
body {
height: 100%;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
border: 0;
}
</style>
A prop "mesSorte" está voltando apenas uma string vazia nos últimos resultados dos sorteios do Dia de Sorte.
Eu faria um PR, mas dei uma olhada nos seletores e eles nem existem no sorteonline.com.br, então imagino que este repositório esteja completamente diferente da produção hehe
Também notei que o mesSorte era o número do mês no início da API, e depois passou a ser o nome. Seria legal padronizar isso para os resultados passados.
Estou usando os resultados da sua API em https://ms.alami.no . Um app feito em Svelte, AWS para brincar um pouco com os números da MegaSena.
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
Opa, vi que o site sorteioonline teve algumas alterações, por acaso será feito nesta API também?
Estou usando ela para um projeto e não gostaria de ter que encontrar outra API para consumir dados da lotofácil...
Bom dia. Conferindo o banco de dados, percebi que estão faltando os sorteios da quina dos concursos 6412, 6413 e 6414
Existe um horário padrão de atualização dos resultados/jogos? Por exemplo o concurso 2739 de hoje 20/06, ainda não foi atualizado o resultado e o próximo concurso 2740 ainda não conta na API. Agradeço e parabéns pelo ótimo trabalho.
Amigo, criei um app que consome sua API, e não está mais funcionando, tem previsão de retorno ou encerrou os serviço. Fiz app como exercício da minha faculdade.
Bom dia Guto, Feliz Ano Novo.
Queria dar uma sugestão de incluir no README.md o horário que as cargas de dados ou atualizações ocorrem.
Por exemplo, o resultado da Mega da Virada só ficou disponível hoje, ontem tentei várias vezes o só constava o resultado do concurso anterior, 2439.
Parabéns pela API.
Muito obrigado.
@guto-alves
Create new branches is blocked
I want to send a pull request but its blocked
❯ git push origin fix-too-many-requests
Username for 'https://github.com': iago-costa
Password for 'https://[email protected]':
remote: Permission to guto-alves/loterias-api.git denied to iago-costa.
fatal: unable to access 'https://github.com/guto-alves/loterias-api.git/': The requested URL returned error: 403 /1m25.0s
~/w/loterias-api fix-too-many-requests !1 ?1 ❯
O serviço caiu pela manhã do domingo e desde então não voltou.
Desculpe a minha pergunta de leigo, mas eu posso jogar esses dados numa interface gráfica, amigável e simples?
vi o lugar errado
Primeiramente quero parabenizar o desenvolvedor, API incrivel.
Dito isto, gostaria de dizer que desde ontem (dia 22/11/2023) a API não está funcionando.
Novamente, parabéns pelo belo trabalho da API.
Alguns jogos estão faltando no resultado geral, por exemplo da lotofácil: https://loteriascaixa-api.herokuapp.com/api/lotofacil
Nessa print, percebe-se que do concurso 3074 pula para o 3077 (faltam 2 jogos - 3075 e 3076).
Pode-se fazer a conta do concurso atual - número de itens no array
Por exemplo, se o último concurso é o 3101, deveriam ter 3100 itens no array (pois o primeiro tem o index 0). Porém, há somente 3098 itens.
Este problema se repete para outras loterias, como a quina, etc.
Boa noite
Percebi que a partir do concurso 2900 a API não retorna mais os dados. Será avaliado e corrigido?
Ex: https://loteriascaixa-api.herokuapp.com/api/lotofacil/2900
Olá, vi que você consome os dados do site Sorte Online, porém recentemente eles tiveram uma atualização no site que ocasionou mudanças no nome das classes que você colocou, exemplo:
Na classe consumer.java:
Integer.valueOf(resultElement.getElementsByClass("header-resultados__nro-concurso").text()));
ela agora deve ser
Integer.valueOf(resultElement.getElementsByClass("MuiTypography-root MuiTypography-body1 css-1oj331g").text()));
E ainda vai ter q usar alguma função para separar a data do numero do concurso que estão juntos agora.
Olá Gustavo,
Muito obrigado por disponibilizar essa api. Estou usando ela num projeto de python que gera jogos aleatórios pra MegaSena, e graças a sua api, agora tb posso consultar resultados anteriores.
No item dataProxConcurso não deveria aparecer a data independente se acumulou: True ou não?
No item acumuladaProxConcurso não deveria aparecer o valor acumulado quando o acumulou: True ? curioso que só aparece quando acumulou: False
Minha lógica ta bugando, agradeço a ajuda _/_
Guto Alves, obrigado por disponibilizar esta API, parabéns mesmo!
ele sempre retorna erro agora =/
Concurso #5856 não foi processado
Boa tarde Guto!
Muito legal a iniciativa de fazer esta api e disponibilizá-la publicamente.
Como sugestão acho deveria conter no readme como configurar o o projeto localmente, isso facilitaria as contribuições.
Abraços!!!
Estava desenvolvendo localmente com a API mas quando executo o GET para receber os dados recebo esse código de erro.
Access to XMLHttpRequest at 'https://loterias-api-gutotech.herokuapp.com/api/v0/megasena/latest' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://loterias-api-gutotech.herokuapp.com/api/v0/megasena/latest net::ERR_FAILED 200
Está faltando algo na minha requisição?
Estou usando React e Axios.
./mvnw spring-boot:run;
❯ ./mvnw spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.gutotech:loterias-api >----------------------
[INFO] Building loterias-api 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.4.2:run (default-cli) > test-compile @ loterias-api >>>
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ loterias-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ loterias-api ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 22 source files to /home/ubuntu/workspace/loterias-api/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/ubuntu/workspace/loterias-api/src/main/java/com/gutotech/loteriasapi/consumer/Consumer.java:[83,52] cannot find symbol
symbol: method toList()
location: interface java.util.stream.Stream<java.lang.String>
[ERROR] /home/ubuntu/workspace/loterias-api/src/main/java/com/gutotech/loteriasapi/consumer/Consumer.java:[136,19] cannot find symbol
symbol: method toList()
location: interface java.util.stream.Stream<com.gutotech.loteriasapi.model.Premiacao>
[ERROR] /home/ubuntu/workspace/loterias-api/src/main/java/com/gutotech/loteriasapi/consumer/Consumer.java:[154,19] cannot find symbol
symbol: method toList()
location: interface java.util.stream.Stream<com.gutotech.loteriasapi.model.MunicipioUFGanhadores>
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.649 s
[INFO] Finished at: 2024-07-10T18:35:26Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project loterias-api: Compilation failure: Compilation failure:
[ERROR] /home/ubuntu/workspace/loterias-api/src/main/java/com/gutotech/loteriasapi/consumer/Consumer.java:[83,52] cannot find symbol
[ERROR] symbol: method toList()
[ERROR] location: interface java.util.stream.Stream<java.lang.String>
[ERROR] /home/ubuntu/workspace/loterias-api/src/main/java/com/gutotech/loteriasapi/consumer/Consumer.java:[136,19] cannot find symbol
[ERROR] symbol: method toList()
[ERROR] location: interface java.util.stream.Stream<com.gutotech.loteriasapi.model.Premiacao>
[ERROR] /home/ubuntu/workspace/loterias-api/src/main/java/com/gutotech/loteriasapi/consumer/Consumer.java:[154,19] cannot find symbol
[ERROR] symbol: method toList()
[ERROR] location: interface java.util.stream.Stream<com.gutotech.loteriasapi.model.MunicipioUFGanhadores>
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
❯ neofetch
.-/+oossssoo+/-. ubuntu@dev-vm-server
`:+ssssssssssssssssss+:` --------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 22.04.4 LTS aarch64
.ossssssssssssssssssdMMMNysssso. Host: KVM Virtual Machine virt-4.2
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.15.0-1051-oracle
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 139 days, 10 hours, 26 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 773 (dpkg), 10 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: zsh 5.8.1
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1024x768
ossyNMMMNyMMhsssssssssssssshmmmhssssssso Terminal: /dev/pts/0
ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: (1)
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ GPU: 00:01.0 Red Hat, Inc. Virtio GPU
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Memory: 2187MiB / 5916MiB
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
/0.6s
❯ java --version
openjdk 11.0.23 2024-04-16
OpenJDK Runtime Environment (build 11.0.23+9-post-Ubuntu-1ubuntu122.04.1)
OpenJDK 64-Bit Server VM (build 11.0.23+9-post-Ubuntu-1ubuntu122.04.1, mixed mode)
Primeiramente parabéns pela API... gostaria de saber o que houve que os resultados não vem sendo atualizados? A API da mega-sena mesmo eu vi que o último resultado é de 4 concursos atrás: 29/07/2023.
O que aconteceu?
Dentro do banco de dados, está faltando o resultado do concurso 2664 da Mega-Sena.
2021-10-19 16:41:27.220 INFO 4 --- [ main] c.g.loteriasapi.LoteriasApiApplication : Starting LoteriasApiApplication v0.0.1-SNAPSHOT using Java 1.8.0_302-heroku on e1e0c14f-0eea-45f8-bed9-be0937047665 with PID 4 (/app/target/loterias-api-0.0.1-SNAPSHOT.jar started by u19214 in /app)
2021-10-19 16:41:27.223 INFO 4 --- [ main] c.g.loteriasapi.LoteriasApiApplication : The following profiles are active: prod
2021-10-19 16:41:30.025 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data MongoDB repositories in DEFAULT mode.
2021-10-19 16:41:30.072 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 42 ms. Found 4 MongoDB repository interfaces.
2021-10-19 16:41:31.080 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 3546 (http)
2021-10-19 16:41:31.092 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-10-19 16:41:31.092 INFO 4 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-10-19 16:41:31.139 INFO 4 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-10-19 16:41:31.139 INFO 4 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 3239 ms
2021-10-19 16:41:31.869 WARN 4 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'megaSenaService': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'megaSenaRepository' defined in com.gutotech.loteriasapi.repository.MegaSenaRepository defined in @EnableMongoRepositories declared on MongoRepositoriesRegistrar.EnableMongoRepositoriesConfiguration: Cannot resolve reference to bean 'mongoTemplate' while setting bean property 'mongoOperations'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
2021-10-19 16:41:31.871 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2021-10-19 16:41:31.880 INFO 4 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-10-19 16:41:31.898 ERROR 4 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'megaSenaService': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'megaSenaRepository' defined in com.gutotech.loteriasapi.repository.MegaSenaRepository defined in @EnableMongoRepositories declared on MongoRepositoriesRegistrar.EnableMongoRepositoriesConfiguration: Cannot resolve reference to bean 'mongoTemplate' while setting bean property 'mongoOperations'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1415) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) ~[spring-context-5.3.3.jar!/:5.3.3]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144) ~[spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311) [spring-boot-2.4.2.jar!/:2.4.2]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300) [spring-boot-2.4.2.jar!/:2.4.2]
at com.gutotech.loteriasapi.LoteriasApiApplication.main(LoteriasApiApplication.java:10) [classes!/:0.0.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_302-heroku]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_302-heroku]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_302-heroku]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_302-heroku]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [loterias-api-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107) [loterias-api-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [loterias-api-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [loterias-api-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'megaSenaRepository' defined in com.gutotech.loteriasapi.repository.MegaSenaRepository defined in @EnableMongoRepositories declared on MongoRepositoriesRegistrar.EnableMongoRepositoriesConfiguration: Cannot resolve reference to bean 'mongoTemplate' while setting bean property 'mongoOperations'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:342) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1691) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1436) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.3.3.jar!/:5.3.3]
... 28 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryDependentConfiguration.class]: Unsatisfied dependency expressed through method 'mongoTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1179) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330) ~[spring-beans-5.3.3.jar!/:5.3.3]
... 41 common frames omitted
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/mongo/MongoDatabaseFactoryConfiguration.class]: Unsatisfied dependency expressed through method 'mongoDatabaseFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1179) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.3.jar!/:5.3.3]
... 51 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongo' defined in class path resource [org/springframework/boot/autoconfigure/mongo/MongoAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1179) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.3.jar!/:5.3.3]
... 65 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mongodb.client.MongoClient]: Factory method 'mongo' threw exception; nested exception is java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.3.jar!/:5.3.3]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.3.jar!/:5.3.3]
... 79 common frames omitted
Caused by: java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://
at com.mongodb.ConnectionString.<init>(ConnectionString.java:287) ~[mongodb-driver-core-4.1.1.jar!/:na]
at org.springframework.boot.autoconfigure.mongo.MongoPropertiesClientSettingsBuilderCustomizer.applyHostAndPort(MongoPropertiesClientSettingsBuilderCustomizer.java:84) ~[spring-boot-autoconfigure-2.4.2.jar!/:2.4.2]
at org.springframework.boot.autoconfigure.mongo.MongoPropertiesClientSettingsBuilderCustomizer.customize(MongoPropertiesClientSettingsBuilderCustomizer.java:54) ~[spring-boot-autoconfigure-2.4.2.jar!/:2.4.2]
at org.springframework.boot.autoconfigure.mongo.MongoClientFactorySupport.customize(MongoClientFactorySupport.java:64) ~[spring-boot-autoconfigure-2.4.2.jar!/:2.4.2]
at org.springframework.boot.autoconfigure.mongo.MongoClientFactorySupport.createMongoClient(MongoClientFactorySupport.java:58) ~[spring-boot-autoconfigure-2.4.2.jar!/:2.4.2]
at org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration.mongo(MongoAutoConfiguration.java:55) ~[spring-boot-autoconfigure-2.4.2.jar!/:2.4.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_302-heroku]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_302-heroku]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_302-heroku]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_302-heroku]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.3.jar!/:5.3.3]
... 80 common frames omitted
O build da sucesso, mas ao rodar a api da isso
Verification documents by collection
test> db.getCollectionNames().map( (name) => ({[name]: db[name].find().toArray().length}) )
[
{ megasenas: 0 },
{ diadesortes: 0 },
{ timemanias: 0 },
{ resultados: 9662 },
{ maismilionarias: 0 },
{ lotomanias: 0 },
{ lotofacils: 0 },
{ quinas: 0 },
{ supersetes: 0 },
{ duplasenas: 0 }
]
test>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.