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
#! /usr/bin/python3 | |
import pip._vendor.requests as requests | |
import sys | |
import time | |
import socket | |
import re | |
# TODO add a validation param | |
url = sys.argv[1] | |
counter = 0 |
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 net.gueka.tutorials.weatherapi.service; | |
import static org.junit.jupiter.api.Assertions.assertTrue; | |
import org.junit.jupiter.api.DisplayName; | |
import org.junit.jupiter.params.ParameterizedTest; | |
import org.junit.jupiter.params.provider.ValueSource; | |
import org.mockito.InjectMocks; | |
import org.mockito.Mock; | |
import org.mockito.Mockito; |
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 net.gueka.tutorials.weatherapi.service; | |
import java.util.Date; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.cache.annotation.CacheConfig; | |
import org.springframework.cache.annotation.CacheEvict; | |
import org.springframework.cache.annotation.Cacheable; | |
import org.springframework.http.ResponseEntity; |
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
@Slf4j | |
@Service | |
@CacheConfig(cacheNames={"weather"}) | |
public class WeatherService { | |
public static final String WEATHER_API_URL = "https://api.openweathermap.org/data/2.5/weather?zip=%s,%s&appid=%s&units=metric"; | |
@Value("${weather.appid}") | |
String appid; |
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
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.gueka.net/promo/schema" | |
targetNamespace="http://www.gueka.net/promo/schema" elementFormDefault="qualified"> | |
<xs:element name="promotionRequest"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="data" type="tns:data"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> |
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
buildscript { | |
ext { | |
jaxbVersion = '2.3.2' | |
wsdlVersion = '1.6.3' | |
junitVersion = '5.3.2' | |
} | |
} | |
plugins { | |
id 'org.springframework.boot' version '2.1.3.RELEASE' |
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 net.gueka.promo.config; | |
import javax.servlet.Servlet; | |
import org.springframework.boot.web.servlet.ServletRegistrationBean; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.io.ClassPathResource; | |
import org.springframework.ws.config.annotation.EnableWs; |
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 net.gueka.user; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import static org.junit.jupiter.api.Assertions.assertNotNull; | |
import static org.junit.jupiter.api.Assertions.assertTrue; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.UUID; |
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 net.gueka.user.repository; | |
import java.util.UUID; | |
import org.springframework.data.cassandra.repository.CassandraRepository; | |
import org.springframework.stereotype.Repository; | |
import net.gueka.user.model.User; | |
@Repository |
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 net.gueka.user.model; | |
import java.util.List; | |
import java.util.UUID; | |
import com.datastax.driver.core.DataType.Name; | |
import org.springframework.data.cassandra.core.mapping.CassandraType; | |
import org.springframework.data.cassandra.core.mapping.PrimaryKey; | |
import org.springframework.data.cassandra.core.mapping.Table; |
NewerOlder