forked from lsmyrnaios/UrlsController
- Add the "installAndRun.sh" script.
- Update the README. - Update the dependencies.
This commit is contained in:
parent
d56e988518
commit
983b900da7
|
@ -1,2 +1,11 @@
|
||||||
# UrlsController
|
# UrlsController
|
||||||
|
|
||||||
|
This is the Controller's Application.<br>
|
||||||
|
It receives requests coming from the [workers](https://code-repo.d4science.org/lsmyrnaios/UrlsWorker) , constructs an assignments-list with data received from a database and returns the list to the workers.<br>
|
||||||
|
Then it receives the "WorkerReports" and writes them into the database.<br>
|
||||||
|
The database used is the [Impala](https://impala.apache.org/) .<br>
|
||||||
|
[...] <br>
|
||||||
|
|
||||||
|
To install and run the application, run ```git clone``` and then execute the ```installAndRun.sh``` script.<br>
|
||||||
|
If you want to just run the app, then run the script with the argument "1": ```./installAndRun.sh 1```.<br>
|
||||||
|
<br>
|
||||||
|
|
15
build.gradle
15
build.gradle
|
@ -1,11 +1,12 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
ext {
|
ext {
|
||||||
springSecurityVersion = "5.5.1"
|
springBootVersion = "2.5.4"
|
||||||
|
springSecurityVersion = "5.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'org.springframework.boot' version '2.5.3'
|
id 'org.springframework.boot' version '2.5.4'
|
||||||
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
|
||||||
id 'java'
|
id 'java'
|
||||||
}
|
}
|
||||||
|
@ -20,11 +21,13 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
runtimeOnly 'org.springframework.boot:spring-boot-devtools'
|
runtimeOnly "org.springframework.boot:spring-boot-devtools:${springBootVersion}"
|
||||||
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
implementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
|
||||||
implementation("org.springframework.boot:spring-boot-starter-security")
|
implementation("org.springframework.boot:spring-boot-starter-security:${springBootVersion}")
|
||||||
implementation("org.springframework.boot:spring-boot-configuration-processor")
|
implementation("org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}")
|
||||||
|
|
||||||
|
implementation("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}")
|
||||||
implementation("org.springframework.security:spring-security-core:${springSecurityVersion}")
|
implementation("org.springframework.security:spring-security-core:${springSecurityVersion}")
|
||||||
implementation("org.springframework.security:spring-security-web:${springSecurityVersion}")
|
implementation("org.springframework.security:spring-security-web:${springSecurityVersion}")
|
||||||
implementation("org.springframework.security:spring-security-config:${springSecurityVersion}")
|
implementation("org.springframework.security:spring-security-config:${springSecurityVersion}")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
cd "${0%/*}" || (echo "Could not chdir to this script's dir!" && exit) # Change the working directory to the script's directory, when running from other location.
|
||||||
|
|
||||||
|
justInstall=0
|
||||||
|
|
||||||
|
if [[ $# -eq 1 ]]; then
|
||||||
|
justInstall=$1
|
||||||
|
elif [[ $# -gt 1 ]]; then
|
||||||
|
echo -e "Wrong number of arguments given: ${#}\nPlease execute it like: script.sh <justInstall: 0 | 1>"; exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
gradleVersion="7.2"
|
||||||
|
|
||||||
|
if [[ justInstall -eq 0 ]]; then
|
||||||
|
|
||||||
|
wget https://services.gradle.org/distributions/gradle-${gradleVersion}-bin.zip
|
||||||
|
|
||||||
|
sudo mkdir /opt/gradle
|
||||||
|
sudo unzip -d /opt/gradle gradle-${gradleVersion}-bin.zip
|
||||||
|
#ls /opt/gradle/gradle-${gradleVersion} # For debugging installation
|
||||||
|
|
||||||
|
export PATH=$PATH:/opt/gradle/gradle-${gradleVersion}/bin
|
||||||
|
|
||||||
|
gradle wrapper --gradle-version=${gradleVersion} --distribution-type=bin
|
||||||
|
|
||||||
|
#gradle tasks # For debugging installation
|
||||||
|
#gradle -v # For debugging installation
|
||||||
|
|
||||||
|
gradle clean
|
||||||
|
gradle build
|
||||||
|
else
|
||||||
|
export PATH=$PATH:/opt/gradle/gradle-${gradleVersion}/bin # Make sure the gradle is still accessible (it usually isn't without the "export").
|
||||||
|
fi
|
||||||
|
|
||||||
|
gradle bootRun
|
Loading…
Reference in New Issue