- Based on https://gist.github.com/mdziekon/221bdb597cf32b46c50ffab96dbec08a
- Installation date: 16-08-2019
- Additional notes based on my own experience
- EFI boot
- Ubuntu 19.04 -> 21.04
- This should work on any computer. Only the
RAID > AHCIchange described below and the device name for the nvme ssd drive are specific to this laptop. - The process describes a completely fresh installation with complete repartitioning, however it should work fine when Windows is already installed (eg. brand new machine with Windows preinstalled) as long as Windows already boots with EFI.
- The process was conducted on Dell's XPS 15 9560 (2017) with specs:
- CPU: i7-7700HQ
| import org.junit.jupiter.api.extension.ExtendWith; | |
| import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; | |
| import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; | |
| import org.springframework.test.annotation.DirtiesContext; | |
| import org.springframework.test.context.ActiveProfiles; | |
| import org.springframework.test.context.junit.jupiter.SpringExtension; | |
| /* | |
| Classe base para testes do Spring Data JPA | |
| */ |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <entity-mappings | |
| xmlns="http://java.sun.com/xml/ns/persistence/orm" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_3_0.xsd" | |
| version="1.0"> | |
| <named-query name="nomeNamedQuery"> | |
| <query> | |
| // Fonte: https://spring.io/blog/2015/06/08/cors-support-in-spring-framework#filter-based-cors-support | |
| import java.util.Collections; | |
| import org.springframework.boot.web.servlet.FilterRegistrationBean; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.core.Ordered; | |
| import org.springframework.web.cors.CorsConfiguration; | |
| import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
| version: '3.4' | |
| services: | |
| consul-leader: | |
| image: consul | |
| command: agent -server -client=0.0.0.0 -bootstrap -ui | |
| volumes: | |
| - consul-data-leader:/consul/data | |
| environment: | |
| - CONSUL_BIND_INTERFACE=eth0 |
| /* | |
| * Copyright 2020-2021 the original author or authors. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * https://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
Primeiro é necessário preencher as configurações dos DataSources no arquivo de configuração. No nosso caso utilizamos no formato YML (application.yml), para criar dois DataSources, um para o banco de dados chamado "usuarios" e outro para "mensagens":
spring:
datasource.mensagens:
username: root
url: jdbc:mysql://localhost:3306/awmensagens?createDatabaseIfNotExist=true&serverTimezone=UTCNão é de hoje que o React.js é o queridinho das empresas de desenvolvimento de software quando se fala em mobile e front-end web, e isso fez com que surgissem inúmeras vagas relacionadas à tecnologia.
Mas nem todo profissional ou iniciante da área de desenvolvimento tem domínio da linguagem de programação JavaScript (que é a base do React.js), e acabam com medo de iniciar com a tecnologia.
Se você é um deles, seus problemas acabaram agora. Neste artigo vamos abordar tudo que você precisa saber sobre React, sem a necessidade de muito conhecimento em JavaScript.