Commit b520bf72 authored by Yakshit Jain's avatar Yakshit Jain
Browse files

Initial commit

parents
HELP.md
.gradle
build/
bin/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**
!**/src/test/**
**.DS_Store
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
{
# CRIO_SOLUTION_AND_STUB_ONLY_START_MODULE_VSCODEBASICS
"module_id": "ME_QCALC_MODULE_VSCODEBASICS",
# CRIO_SOLUTION_AND_STUB_ONLY_END_MODULE_VSCODEBASICS
# CRIO_SOLUTION_AND_STUB_ONLY_START_MODULE_OOP
"module_id": "ME_QCALC_MODULE_OOP",
# CRIO_SOLUTION_AND_STUB_ONLY_END_MODULE_OOP
# CRIO_SOLUTION_AND_STUB_ONLY_START_MODULE_TESTSANDERRORS
"module_id": "ME_QCALC_MODULE_TESTSANDERRORS",
# CRIO_SOLUTION_AND_STUB_ONLY_END_MODULE_TESTSANDERRORS
# CRIO_SOLUTION_AND_STUB_ONLY_START_MODULE_DEBUGGER
"module_id": "ME_QCALC_MODULE_DEBUGGER",
# CRIO_SOLUTION_AND_STUB_ONLY_END_MODULE_DEBUGGER
# CRIO_SOLUTION_AND_STUB_ONLY_START_MODULE_INHERITANCE
"module_id": "ME_QCALC_MODULE_INHERITANCE"
# CRIO_SOLUTION_AND_STUB_ONLY_END_MODULE_INHERITANCE
}
\ No newline at end of file
plugins {
id 'org.springframework.boot' version '2.3.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
}
ext {
buildId = System.currentTimeMillis()
}
group = 'com.crio'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
compileOnly 'org.projectlombok:lombok:1.18.16'
annotationProcessor 'org.projectlombok:lombok:1.18.16'
testCompileOnly 'org.projectlombok:lombok:1.18.16'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.16'
}
test {
reports {
junitXml.enabled = true
def destinationDirectory = System.getProperty("user.home") + "/.gradle/daemon/${buildId}/test-results"
junitXml.destination = file(destinationDirectory)
html.enabled = true
}
useJUnitPlatform {
}
testLogging.events ("STANDARD_ERROR")
testLogging.events ("STANDARD_OUT")
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTEST RESULT: ${result.resultType}"
println "TEST SUMMARY: RAN ${result.testCount} TESTS, " +
"${result.successfulTestCount} SUCCEEDED, " +
"${result.failedTestCount} FAILED, " +
"${result.skippedTestCount} SKIPPED"
}
}
}
# $SOLUTION_ROOT has source folder
# $TESTSUITES_ROOT has target folder
#mkdir -p $TESTSUITES_ROOT/ && cp -r $SOLUTION_ROOT/stockquotes/src/test $TESTSUITES_ROOT/
.git/
config/
build/
.idea/
.gradle/
TODO.txt
.swp
.lock
.class
.ods
.bin
.DS_Store
\ No newline at end of file
VSCODEBASICS, chmod +x gradlew || ./gradlew build
OOP, chmod +x gradlew || ./gradlew build
TESTSANDERRORS, chmod +x gradlew || ./gradlew build
DEBUGGER, chmod +x gradlew || ./gradlew build
INHERITANCE, chmod +x gradlew || ./gradlew build
######################################## EDITABLE ###############################################
# ME details
ME_ID="QCALC"
# gitlab details
GITLAB_UPLOAD_DESTINATION="GITLAB_DEV_CRIO_DO"
# path to root folders - must exist
#INPUT_PROJECT_ROOT_PATH="/home/arun/workspace/crio/"
STUB_GENERATION="/Users/raghu/projects/generator"
INPUT_PROJECT_ROOT_PATH="/Users/raghu/mentor/repos/me_qcalc/qcalc"
RESULTS_ROOT_FOLDER="/Users/raghu/mentor/repos/me_qcalc_stubs"
#INPUT_PROJECT_ROOT_PATH="/home/arun/workspace/crio/ME_INTERVIEW_PREP_JAVA/me_interview_prep_java"
#RESULTS_ROOT_FOLDER="/home/arun/workspace/crio/ME_INTERVIEW_PREP_JAVA/solution_and_stubs"
# additional needed files - must exist
MODULE_ORDERING_FILE="${INPUT_PROJECT_ROOT_PATH}/config/module_ordering.txt"
IGNORE_DIRECTORIES_FILE="${INPUT_PROJECT_ROOT_PATH}/config/directories.ignore"
IGNORE_FILETYPES_FILE="${INPUT_PROJECT_ROOT_PATH}/config/filetypes.ignore"
GITLAB_CREDENTIALS="${STUB_GENERATION}/config/gitlab.config"
TESTSUITES_ACTION_SCRIPT="${INPUT_PROJECT_ROOT_PATH}/config/action.sh"
######################################## DO NOT EDIT ###############################################
# folders to generaete - must follow conventions
SOLUTION_GROUP_NAME="ME_${ME_ID}_SOLUTION"
TESTSUITES_GROUP_NAME="ME_${ME_ID}_TESTSUITES"
INTERMEDIATE_STUB_GROUP_NAME="ME_${ME_ID}_INTERMEDIATE_STUBS"
FINAL_STUB_GROUP_NAME="ME_${ME_ID}_STUBS"
# path to log files - will be generated
VALIDATOR_LOG="${RESULTS_ROOT_FOLDER}/logs/validator.log"
SOLUTION_LOG="${RESULTS_ROOT_FOLDER}/logs/solution.log"
TESTSUITES_LOG="${RESULTS_ROOT_FOLDER}/logs/testsuites.log"
INTERMEDIATE_STUBS_LOG="${RESULTS_ROOT_FOLDER}/logs/intermediate_stub.log"
FINAL_STUBS_LOG="${RESULTS_ROOT_FOLDER}/logs/final_stub.log"
GITLAB_LOG="${RESULTS_ROOT_FOLDER}/logs/gitlab.log"
######################################## UTILS ###############################################
# scripts that should be executed - can be cherry-picked
# commands=(
# "VALIDATOR" "SOLUTION_GENERATOR" "TESTSUITES_GENERATOR" "INTERMEDIATE_STUBS_GENERATOR" "FINAL_STUBS_GENERATOR" "GITLAB_UPLOAD"
# )
commands=(
#"VALIDATOR" "SOLUTION_GENERATOR" "TESTSUITES_GENERATOR" "INTERMEDIATE_STUBS_GENERATOR" "FINAL_STUBS_GENERATOR" "GITLAB_UPLOAD"
"VALIDATOR"
"SOLUTION_GENERATOR"
"INTERMEDIATE_STUBS_GENERATOR" "FINAL_STUBS_GENERATOR"
"GITLAB_UPLOAD"
)
######################################## COMMANDS ###############################################
# input: master solution folder
# output: validation messages on console
rm -rf ${RESULTS_ROOT_FOLDER}/*
if [[ " ${commands[@]} " =~ "VALIDATOR" ]]; then
python3 ${STUB_GENERATION}/src/validator.py \
--input ${INPUT_PROJECT_ROOT_PATH} \
--log ${VALIDATOR_LOG} \
--config ${MODULE_ORDERING_FILE} \
--ignore_directories ${IGNORE_DIRECTORIES_FILE} \
--ignore_filetypes ${IGNORE_FILETYPES_FILE}
echo "\n***************** Validation complete ************************\n"
fi
######################################################################################################
# input: master solution folder
# output: solution group with each sub-folder having the solution for that module
if [[ " ${commands[@]} " =~ "SOLUTION_GENERATOR" ]]; then
python3 ${STUB_GENERATION}/src/generate_solution.py \
--input ${INPUT_PROJECT_ROOT_PATH} \
--log ${SOLUTION_LOG} \
--config ${MODULE_ORDERING_FILE} \
--me_id ${ME_ID} \
--ignore_directories ${IGNORE_DIRECTORIES_FILE} \
--ignore_filetypes ${IGNORE_FILETYPES_FILE} \
--output ${RESULTS_ROOT_FOLDER} \
--group_name ${SOLUTION_GROUP_NAME} \
#--remove_unused_imports
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Solution Generation Failed ************************\n"
exit 1
else
echo "\n***************** Solution Generation Succeded ************************\n"
sleep 1
fi
fi
######################################################################################################
# input: solution group folder, action script
# output: testsuites group with each sub-folder having the tests for that module
if [[ " ${commands[@]} " =~ "TESTSUITES_GENERATOR" ]]; then
testsuites_input="${RESULTS_ROOT_FOLDER}/${SOLUTION_GROUP_NAME}"
testsuites_output="${RESULTS_ROOT_FOLDER}/${TESTSUITES_GROUP_NAME}"
python3 ${STUB_GENERATION}/src/generate_testsuites.py \
--action ${TESTSUITES_ACTION_SCRIPT} \
--input ${testsuites_input} \
--output ${testsuites_output}
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Testsuites Generation Failed ************************\n"
exit 1
else
echo "\n***************** Testsuites Generation Succeded ************************\n"
sleep 1
fi
fi
######################################################################################################
# input: solution group folder
# output: intermediate stub group with each sub-folder having the intemediate stub for that module
if [[ " ${commands[@]} " =~ "INTERMEDIATE_STUBS_GENERATOR" ]]; then
intermediate_stub_input="${RESULTS_ROOT_FOLDER}/${SOLUTION_GROUP_NAME}"
python3 ${STUB_GENERATION}/src/generate_intermediate_stub.py \
--input ${intermediate_stub_input} \
--log ${INTERMEDIATE_STUBS_LOG} \
--config ${MODULE_ORDERING_FILE} \
--me_id ${ME_ID} \
--ignore_directories ${IGNORE_DIRECTORIES_FILE} \
--ignore_filetypes ${IGNORE_FILETYPES_FILE} \
--output ${RESULTS_ROOT_FOLDER} \
--group_name ${INTERMEDIATE_STUB_GROUP_NAME} \
#--remove_unused_imports
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Intermediate Stub Generation Failed ************************\n"
exit 1
else
echo "\n***************** Intermediate Stub Generation Succeded ************************\n"
sleep 1
fi
fi
######################################################################################################
# input: intermediate stub group folder
# output: final stub group with each sub-folder having the final stub for that module
if [[ " ${commands[@]} " =~ "FINAL_STUBS_GENERATOR" ]]; then
stub_input_folder="${RESULTS_ROOT_FOLDER}/${INTERMEDIATE_STUB_GROUP_NAME}"
# stub_output_folder="${RESULTS_ROOT_FOLDER}/${FINAL_STUB_GROUP_NAME}/"
python3 ${STUB_GENERATION}/src/generate_stub.py \
--input ${stub_input_folder} \
--log ${FINAL_STUBS_LOG} \
--config ${MODULE_ORDERING_FILE} \
--output ${RESULTS_ROOT_FOLDER} \
--group_name ${FINAL_STUB_GROUP_NAME} \
--me_id ${ME_ID}
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Final Stub Generation Failed ************************\n"
exit 1
else
cd ${RESULTS_ROOT_FOLDER}/${FINAL_STUB_GROUP_NAME}
find . -name gradlew | xargs chmod +x
cd -
echo "\n***************** Final Stub Generation Succeded ************************\n"
sleep 1
fi
fi
######################################################################################################
# input: group folder which have sub-folders for each module
# output:
# - group folder created as a group in gitlab destination
# - module sub-folder created as a repository within the group in gitlab destination
# - updated content of each module pushed as a commit to the respective repository in gitlab destination
echo "\n***************** Remove empty files and directories ************************\n"
cd $INPUT_PROJECT_ROOT_PATH;
find . -empty -type f -delete
find . -empty -type d -delete
git update-index --chmod=+x gradlew
cd -;
if [[ " ${commands[@]} " =~ "GITLAB_UPLOAD" ]]; then
# upload solution
solution_path="${RESULTS_ROOT_FOLDER}/${SOLUTION_GROUP_NAME}"
python3 ${STUB_GENERATION}/src/gitlab_repo.py \
--config ${GITLAB_CREDENTIALS} \
--group ${solution_path} \
--log ${GITLAB_LOG} \
--remote_source ${GITLAB_UPLOAD_DESTINATION}
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Gitlab Upload for Solution Failed ************************\n"
exit 1
else
echo "\n***************** Gitlab Upload for Solution Succeded ************************\n"
fi
# -------------------------------
# upload test suites
testsuites_path="${RESULTS_ROOT_FOLDER}/${TESTSUITES_GROUP_NAME}"
#python3 src/gitlab_repo.py \
#--config ${GITLAB_CREDENTIALS} \
#--group ${testsuites_path} \
#--log ${GITLAB_LOG} \
#--remote_source ${GITLAB_UPLOAD_DESTINATION}
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Gitlab Upload for Test Suites Failed ************************\n"
exit 1
else
echo "\n***************** Gitlab Upload for Test Suites Succeded ************************\n"
fi
# -------------------------------
# upload stubs
stub_path="${RESULTS_ROOT_FOLDER}/${FINAL_STUB_GROUP_NAME}"
python3 ${STUB_GENERATION}/src/gitlab_repo.py \
--config ${GITLAB_CREDENTIALS} \
--group ${stub_path} \
--log ${GITLAB_LOG} \
--remote_source ${GITLAB_UPLOAD_DESTINATION}
ret=$?
if [ $ret -ne 0 ]
then
echo "\n***************** Gitlab Upload for Stubs Failed ************************\n"
exit 1
else
echo "\n***************** Gitlab Upload for Stubs Succeded ************************\n"
fi
fi
File added
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
#
# Copyright 2015 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
# 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.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
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
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
rootProject.name = 'qcalc'
package com.crio.qcalc;
//import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
System.out.println("Starting application..");
}
}
\ No newline at end of file
package com.crio.qcalc.controller;
public class CardController {
}
\ No newline at end of file
package com.crio.qcalc.controller;
public class UserController {
}
\ No newline at end of file
package com.crio.qcalc.entity;
import org.springframework.data.annotation.Id;
public class Answer {
@Id
public int answerId;
public String answerText;
}
package com.crio.qcalc.entity;
import java.util.List;
import org.springframework.data.annotation.Id;
import lombok.Data;
@Data
public class Card {
@Id
public int cardId;
public String cardName;
public List<Question> questions;
}
package com.crio.qcalc.entity;
import org.springframework.data.annotation.Id;
public class Question {
@Id
public int questionId;
public String questionText;
public Answer answer;
}
package com.crio.qcalc.entity;
import org.springframework.data.annotation.Id;
public class User {
@Id
public int userId;
public String name;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment