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
group 'br.com.smc' | |
version '0.0.1-SNAPSHOT' | |
buildscript { | |
ext { | |
springBootVersion = '1.5.2.RELEASE' | |
} | |
repositories { | |
/*maven { | |
url("http://inforep01.ogmaster.local:8080/nexus/content/groups/public/") |
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
drwxrwxr-x+ 1 Sidneyc Domain Users 0 Apr 27 10:13 gradle | |
drwxrwxr-x+ 1 Administradores Domain Users 0 Apr 24 15:18 .gradle | |
-rwxrwxr-x+ 1 Sidneyc Domain Users 5.2K Apr 27 10:13 gradlew | |
-rw-rw-r--+ 1 Sidneyc Domain Users 2.3K Apr 27 10:13 gradlew.bat | |
-rw-rw-r--+ 1 Sidneyc Domain Users 3.0K Apr 27 14:02 build.gradle | |
-rw-rw-r--+ 1 Sidneyc Domain Users 35 Apr 27 10:13 settings.gradle |
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 br.com.smc.meurumo.config.ConfigProperties | |
import com.paypal.base.rest.APIContext | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer | |
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer | |
import org.springframework.boot.web.servlet.ErrorPage | |
import org.springframework.context.annotation.Bean | |
import org.springframework.http.HttpStatus |
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 org.slf4j.Logger | |
import org.slf4j.LoggerFactory | |
import org.springframework.boot.CommandLineRunner | |
import org.springframework.boot.SpringApplication | |
import org.springframework.boot.autoconfigure.SpringBootApplication | |
import org.springframework.boot.system.ApplicationPidFileWriter | |
/** | |
* Classe de entrada da aplicaçao SpringBoot. | |
*/ |
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 br.com.smc.meurumo.config.ConfigProperties | |
import br.com.smc.meurumo.domain.busca.dto.Busca | |
import br.com.smc.meurumo.domain.busca.service.GerenciadorDeAutoComplete | |
import org.slf4j.LoggerFactory | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.stereotype.Controller | |
import org.springframework.ui.Model | |
import org.springframework.web.bind.annotation.RequestMapping | |
import org.springframework.web.bind.annotation.RequestMethod |
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
# =============================== | |
# = DATA SOURCE | |
# =============================== | |
spring.datasource.url=jdbc:mariadb://localhost:3306/mydb | |
spring.datasource.username=username | |
spring.datasource.password=passcode | |
spring.datasource.driverClassName = org.mariadb.jdbc.Driver | |
# Evitando perda de conexao com o MySql por inatividade |
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
spring: | |
# =============================== | |
# = DATA SOURCE | |
# =============================== | |
# define DataSrouce properties | |
# use h2 can have a buid in web console http://localhost:8080/h2-console | |
datasource: | |
url: jdbc:mariadb://localhost:3306/mydb | |
driverClassName: org.mariadb.jdbc.Driver |
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 org.springframework.beans.factory.annotation.Value | |
import org.springframework.context.annotation.Configuration | |
@Configuration | |
class ConfigProperties { | |
@Value('${busca.parametro}') | |
Double raioEmKm; | |
@Value('${email.contato}') |
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 br.com.smc.meurumo.domain.comercio.valueobject.CentroideEstabelecimento | |
import br.com.smc.meurumo.domain.comercio.valueobject.EnderecoEstabelecimento | |
import br.com.smc.meurumo.domain.ibge.entity.SetorCensitario | |
import javax.persistence.* | |
/** | |
* Entidade representando um estabelecimento comercial registrado no Brasil. | |
*/ | |
@Entity |
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 br.com.smc.meurumo.domain.comercio.entity.Estabelecimento | |
import org.springframework.data.jpa.repository.Query | |
import org.springframework.data.repository.Repository | |
import org.springframework.data.repository.query.Param | |
/** | |
* Repositório de {@link Estabelecimento}. | |
*/ | |
interface EstabelecimentoRepository extends Repository<Estabelecimento, String> { |
OlderNewer