Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
0c7d3a7
init: cria projeto
GabrielTorelo Jul 11, 2023
3ced272
adiciona dependências necessárias no projeto
GabrielTorelo Jul 11, 2023
59c237c
adiciona plugin do 'Maven' necessário para o projeto
GabrielTorelo Jul 11, 2023
b5e2ff3
altera versão do 'starter-parent' e remove dependências desnecessária…
GabrielTorelo Jul 11, 2023
4649380
cria arquivos '.properties' (application e application-test) do projeto
GabrielTorelo Jul 11, 2023
9462566
cria classe 'Game' com ORM 'jakarta'
GabrielTorelo Jul 13, 2023
0ca3bea
altera o tipo da coluna 'longDescription' para aceitar mais de 255 ca…
GabrielTorelo Jul 14, 2023
404d2f6
Merge pull request #1 from GabrielTorelo/feat/gameClass
GabrielTorelo Jul 14, 2023
274dfaa
cria o arquivo 'import.sql' (executado ao iniciar a aplicação) conten…
GabrielTorelo Jul 14, 2023
f2985eb
Merge pull request #3 from GabrielTorelo/feat/importSQL
GabrielTorelo Jul 14, 2023
048a1d9
cria um DTO com as mínimas informações necessárias dos jogos (Home - …
GabrielTorelo Jul 14, 2023
df802b5
Merge pull request #4 from GabrielTorelo/feat/gameDTOs
GabrielTorelo Jul 14, 2023
81d5284
cria repositório para jogos (APIs para operações CRUD básicas) com o …
GabrielTorelo Jul 14, 2023
d13ce5c
Merge pull request #5 from GabrielTorelo/feat/gameRepository
GabrielTorelo Jul 14, 2023
b6d9cdc
cria função de listar todos os jogos do BD, retornando um DTO com ape…
GabrielTorelo Jul 14, 2023
c460ede
Merge pull request #6 from GabrielTorelo/feat/gameService
GabrielTorelo Jul 14, 2023
b639e89
cria função 'readAll' que retorna o DTO do 'GameService' com todos os…
GabrielTorelo Jul 14, 2023
54a7a7b
Merge pull request #7 from GabrielTorelo/feat/gameController
GabrielTorelo Jul 14, 2023
5da8610
cria classe 'GameList' com ORM 'jakarta'
GabrielTorelo Jul 15, 2023
21b2ff1
Merge pull request #8 from GabrielTorelo/feat/gameListClass
GabrielTorelo Jul 15, 2023
b7a9488
cria classe 'BelongingPK' contendo referência ao GameID e GameListID
GabrielTorelo Jul 15, 2023
8620bd5
cria classe 'Belonging' com ORM 'jakarta'
GabrielTorelo Jul 15, 2023
27e4262
Merge pull request #9 from GabrielTorelo/feat/belongingClass
GabrielTorelo Jul 15, 2023
3fdd18d
cria script para inserir 2 novas listas de jogos para teste no BD
GabrielTorelo Jul 15, 2023
e00b8e4
cria script para inserir jogos na lista 'Todos os Jogos' para teste n…
GabrielTorelo Jul 15, 2023
586a410
Merge pull request #10 from GabrielTorelo/feat/importSQL
GabrielTorelo Jul 15, 2023
d7693e4
cria os métodos 'set'
GabrielTorelo Jul 15, 2023
934777d
cria DTO com quase todas as informações dos jogos (Long - Game Descri…
GabrielTorelo Jul 15, 2023
7bba446
cria DTO com as mínimas informações dos jogos + descrição curta (Shor…
GabrielTorelo Jul 15, 2023
1d2ae20
Merge pull request #11 from GabrielTorelo/feat/gameDTOs
GabrielTorelo Jul 15, 2023
2c61f2b
altera método 'readAll' e define explicitamente para somente leitura
GabrielTorelo Jul 15, 2023
b79db27
cria métodos 'readID' e 'readMoreID'
GabrielTorelo Jul 15, 2023
c0a078d
Merge pull request #12 from GabrielTorelo/feat/gameService
GabrielTorelo Jul 15, 2023
b831c93
cria os métodos 'readID' e 'readMoreID' que retornam os DTOs do 'Game…
GabrielTorelo Jul 15, 2023
c4473ad
Merge pull request #13 from GabrielTorelo/feat/gameController
GabrielTorelo Jul 15, 2023
196bda5
cria DTO com todas informações das listas de jogos
GabrielTorelo Jul 15, 2023
a24844b
Merge pull request #14 from GabrielTorelo/feat/gameListDTOs
GabrielTorelo Jul 15, 2023
44368d3
cria repositório para listas de jogos com o uso do 'JpaRepository'
GabrielTorelo Jul 15, 2023
d7b18b4
Merge pull request #15 from GabrielTorelo/feat/gameListRepository
GabrielTorelo Jul 15, 2023
3370e0b
cria métodos para mostrar todas as listas de jogos do BD ou exibir um…
GabrielTorelo Jul 15, 2023
adfb26d
Merge pull request #16 from GabrielTorelo/feat/gameListService
GabrielTorelo Jul 15, 2023
f4becb6
cria métodos 'readAll' e 'readID' que retornam o DTO do 'GameListServ…
GabrielTorelo Jul 15, 2023
07768eb
Merge pull request #17 from GabrielTorelo/feat/gameListController
GabrielTorelo Jul 15, 2023
09d237b
cria script para inserir jogos na lista 'Meus Favoritos' para teste n…
GabrielTorelo Jul 15, 2023
ab930fa
Merge pull request #18 from GabrielTorelo/feat/importSQL
GabrielTorelo Jul 15, 2023
c96f6fb
cria 'Projection' com as informações necessárias para mostrar um jogo…
GabrielTorelo Jul 16, 2023
e7da4a3
Merge pull request #19 from GabrielTorelo/feat/gameProjections
GabrielTorelo Jul 16, 2023
23a2061
cria consulta (query) ao BD que retorna apenas os jogos dentro de uma…
GabrielTorelo Jul 16, 2023
7fadf19
Merge pull request #20 from GabrielTorelo/feat/gameRepository
GabrielTorelo Jul 16, 2023
fb66c72
cria construtor que recebe o 'GameMinProjection' como argumento e cri…
GabrielTorelo Jul 16, 2023
8ff8c2b
Merge pull request #21 from GabrielTorelo/feat/gameDTOs
GabrielTorelo Jul 16, 2023
ac0a9c1
cria método 'readListID'
GabrielTorelo Jul 16, 2023
bdf6819
Merge pull request #22 from GabrielTorelo/feat/gameService
GabrielTorelo Jul 16, 2023
cbf285a
cria método 'readListID' que retorna o DTO do 'GameService' com todos…
GabrielTorelo Jul 16, 2023
9d6b7d5
Merge pull request #23 from GabrielTorelo/feat/gameListController
GabrielTorelo Jul 16, 2023
0e9b435
adiciona pasta do docker '.data/'
GabrielTorelo Jul 16, 2023
07d34d9
Merge pull request #26 from GabrielTorelo/gitIgnore
GabrielTorelo Jul 16, 2023
6195c4c
cria 'system.properties' contendo a versão do Java Runtime
GabrielTorelo Jul 17, 2023
5b04747
cria propriedades do ambiente de desenvolvimento [Homol]
GabrielTorelo Jul 17, 2023
2344cb7
cria propriedades do ambiente de produção [Prod]
GabrielTorelo Jul 17, 2023
583779a
altera o perfil de execução do projeto para o perfil de desenvolvimen…
GabrielTorelo Jul 17, 2023
71c1847
Merge pull request #27 from GabrielTorelo/environments
GabrielTorelo Jul 17, 2023
73f1561
altera tipagem da coluna 'longDescription' (long_description) para 'T…
GabrielTorelo Jul 17, 2023
313ff82
Merge pull request #28 from GabrielTorelo/fix/gameClass
GabrielTorelo Jul 17, 2023
edd7061
cria o 'WebConfig.java' contendo a validação de acesso
GabrielTorelo Jul 17, 2023
b041b18
Merge pull request #29 from GabrielTorelo/feat/configCORS
GabrielTorelo Jul 17, 2023
14812da
altera o perfil de execução do projeto para o perfil de teste [Test]
GabrielTorelo Jul 17, 2023
63c53b4
Merge pull request #30 from GabrielTorelo/environments
GabrielTorelo Jul 17, 2023
9eb9c90
cria DTO com as informações do corpo (body) da requisição de troca de…
GabrielTorelo Jul 17, 2023
88f98a5
Merge pull request #31 from GabrielTorelo/feat/changePositionDTO
GabrielTorelo Jul 17, 2023
4e94f7c
cria consulta (query) ao BD que atualiza a posição de um jogos dentro…
GabrielTorelo Jul 17, 2023
20e24c4
Merge pull request #32 from GabrielTorelo/feat/gameListRepository
GabrielTorelo Jul 17, 2023
bbda455
cria método para movimentar um jogo dentro de uma lista específica
GabrielTorelo Jul 17, 2023
c48b402
Merge pull request #33 from GabrielTorelo/feat/gameListService
GabrielTorelo Jul 17, 2023
171a6e6
cria método 'moveGame' que recebe parametros do corpo (body) da requi…
GabrielTorelo Jul 18, 2023
0e5dcde
Merge pull request #34 from GabrielTorelo/feat/gameListController
GabrielTorelo Jul 18, 2023
c7f01a7
Merge branch 'develop' into release/version-1.0
GabrielTorelo Jul 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### Docker ###
.data/

### VS Code ###
.vscode/
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
308 changes: 308 additions & 0 deletions mvnw
Original file line number Diff line number Diff line change
@@ -0,0 +1,308 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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 distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.2.0
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

if [ -f /usr/local/etc/mavenrc ] ; then
. /usr/local/etc/mavenrc
fi

if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi

if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi

fi

# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "$(uname)" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
else
JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
fi
fi
;;
esac

if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=$(java-config --jre-home)
fi
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
[ -n "$CLASSPATH" ] &&
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
fi

# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
fi

if [ -z "$JAVA_HOME" ]; then
javaExecutable="$(which javac)"
if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=$(which readlink)
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
if $darwin ; then
javaHome="$(dirname "\"$javaExecutable\"")"
javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
else
javaExecutable="$(readlink -f "\"$javaExecutable\"")"
fi
javaHome="$(dirname "\"$javaExecutable\"")"
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi

if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
fi
fi

if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi

basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=$(cd "$wdir/.." || exit 1; pwd)
fi
# end of workaround
done
printf '%s' "$(cd "$basedir" || exit 1; pwd)"
}

# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
# Remove \r in case we run on Windows within Git Bash
# and check out the repository with auto CRLF management
# enabled. Otherwise, we may read lines that are delimited with
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
# splitting rules.
tr -s '\r\n' ' ' < "$1"
fi
}

log() {
if [ "$MVNW_VERBOSE" = true ]; then
printf '%s\n' "$1"
fi
}

BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
if [ -z "$BASE_DIR" ]; then
exit 1;
fi

MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
log "$MAVEN_PROJECTBASEDIR"

##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
if [ -r "$wrapperJarPath" ]; then
log "Found $wrapperJarPath"
else
log "Couldn't find $wrapperJarPath, downloading it ..."

if [ -n "$MVNW_REPOURL" ]; then
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
else
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
fi
while IFS="=" read -r key value; do
# Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
safeValue=$(echo "$value" | tr -d '\r')
case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
esac
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
log "Downloading from: $wrapperUrl"

if $cygwin; then
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
fi

if command -v wget > /dev/null; then
log "Found wget ... using wget"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
else
wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
log "Found curl ... using curl"
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
else
curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
fi
else
log "Falling back to using Java to download"
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaSource=$(cygpath --path --windows "$javaSource")
javaClass=$(cygpath --path --windows "$javaClass")
fi
if [ -e "$javaSource" ]; then
if [ ! -e "$javaClass" ]; then
log " - Compiling MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/javac" "$javaSource")
fi
if [ -e "$javaClass" ]; then
log " - Running MavenWrapperDownloader.java ..."
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
fi
fi
fi
fi
##########################################################################################
# End of extension
##########################################################################################

# If specified, validate the SHA-256 sum of the Maven wrapper jar file
wrapperSha256Sum=""
while IFS="=" read -r key value; do
case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
esac
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
if [ -n "$wrapperSha256Sum" ]; then
wrapperSha256Result=false
if command -v sha256sum > /dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
wrapperSha256Result=true
fi
elif command -v shasum > /dev/null; then
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
wrapperSha256Result=true
fi
else
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
exit 1
fi
if [ $wrapperSha256Result = false ]; then
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
exit 1
fi
fi

MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
[ -n "$CLASSPATH" ] &&
CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
fi

# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
export MAVEN_CMD_LINE_ARGS

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

# shellcheck disable=SC2086 # safe args
exec "$JAVACMD" \
$MAVEN_OPTS \
$MAVEN_DEBUG_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Loading