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
#include <WiFi.h> | |
#include <PubSubClient.h> | |
#include <Adafruit_Sensor.h> | |
#include <DHT.h> | |
#include <DHT_U.h> | |
#define DHTTYPE DHT11 | |
#define DHTPIN 2 | |
DHT_Unified dht(DHTPIN, DHTTYPE); |
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
{% extends 'base.html' %} | |
{% block body %} | |
<nav class="navbar navbar-light bg-light"> | |
<span class="navbar-text"> | |
Matriz Curricular | |
</span> | |
<select class="custom-select col-md-2" id="periodo-list"> | |
<option selected>Selecione um Período</option> | |
{% for periodo in periodo_list %} | |
<option value="{{periodo.get_id()}}">{{periodo.get_nome()}}</option> |
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
public class Property { | |
private PropertyType type; | |
public PropertyType getType() { | |
return type; | |
} | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>br.com.tassioauad</groupId> | |
<artifactId>springbootjersey</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>jar</packaging> |
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
@Configuration | |
@ApplicationPath("v1") | |
public class JerseyConfig extends ResourceConfig { | |
public JerseyConfig() { | |
} | |
@PostConstruct | |
public void setUp() { | |
register(HelloWorldResource.class); |
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
@Component | |
@Path("hello") | |
public class HelloWorldResource { | |
@GET | |
@Produces("application/json") | |
public String hello() { | |
return "Hello, world"; | |
} |
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
{ | |
"_embedded" : { | |
"persons" : [ ] | |
}, | |
"_links" : { | |
"self" : { | |
"href" : "http://localhost:9000/person{?page,size,sort}", | |
"templated" : true | |
}, | |
"profile" : { |
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
@RepositoryRestResource(path = "person") | |
public interface PersonRepository extends PagingAndSortingRepository<Person, Long> { | |
} |
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
@Entity | |
@Table(name = "person") | |
public class Person { | |
@Id | |
@Column(name = "id", nullable = false) | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private Long id; | |
@Column(name = "name", nullable = false, length = 100) | |
private String name; |
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
server.port= 9000 | |
#-----H2 | |
spring.h2.datasource.url=jdbc:h2:file:~/myh2 | |
spring.h2.datasource.username=sa | |
spring.h2.datasource.password= | |
spring.h2.datasource.driver-class-name=org.h2.Driver | |
spring.jpa.show-sql=true |