This file has been truncated, but you can view the full file.
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
create table livros ( | |
id integer primary key auto_increment not null, | |
nome varchar(100) not null, | |
data_de_lancamento date not null, | |
autor_id integer not null, | |
preco decimal(10,2) not null | |
); | |
create table autores ( | |
id integer primary key auto_increment not null, | |
nome varchar(100) not null |
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
create table medicos ( | |
id integer primary key auto_increment not null, | |
crm varchar(50) not null, | |
nome varchar(100) not null | |
); | |
create table receitas ( | |
id integer primary key auto_increment not null, | |
medico_id int not null, | |
nome_remedio varchar(100) not null, |
This file has been truncated, but you can view the full file.
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
create table livros ( | |
id integer primary key auto_increment not null, | |
nome varchar(100) not null, | |
data_de_lancamento date not null, | |
autor_id integer not null, | |
preco decimal(10,2) not null | |
); | |
create table autores ( | |
id integer primary key auto_increment not null, | |
nome varchar(100) not null |
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
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target(ElementType.FIELD) | |
public @interface EsId { | |
} |
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 PerguntaService { | |
//METODO QUE DEVE SER TESTADO, POIS A LOGIDA DE OBTER A LISTA TA AQUI | |
public List<Pergunta> listarPerguntas(){ | |
return List<Pergunta> perguntas = LogicaParaObterEssaLista(); | |
} | |
//METODO UNICAMENTE FEITO PARA TRATAR E FAZER O RETORNO PARA O CONTROLLER |
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 static void main(String[] args) { | |
// String consultaSimplesURL = "http://www8.receita.fazenda.gov.br/SIMPLESNACIONAL/aplicacoes.aspx?id=21"; | |
String consultaSimplesURL = "http://www.santander.com.br"; | |
HashMap<String,Object> inflate = new HashMap<String,Object>(); | |
// inflate.put("cnpj","ContentPlaceHolderConteudo_lblCNPJ::text"); | |
// inflate.put("nomeEmpresaResult","ContentPlaceHolderConteudo_lblNomeEmpresa::text"); | |
// inflate.put("situacaoResult","ContentPlaceHolderConteudo_lblSituacaoSimples::text"); |
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
Filtro JAVA | |
@Override | |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
getToken((HttpServletRequest) request); | |
chain.doFilter(request, response); | |
} | |
private String getToken(HttpServletRequest httpRequest) throws ServletException { | |
String token = null; |
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"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:p="http://www.springframework.org/schema/p" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.2.xsd"> |