Go to the Wiki in order to view our documentation.
- JDK 8
- Gradle
- PostgreSQL 9.5 (withPostgis)
Fork this repo. After that, you have to clone your forked repo on your local machine on the directory you desire: git clone https://github.com/your-github-username/smartCampUZ
.
Assuming you have already installed PostgreSQL, access to template1, wich is a default PostgreSQL database:
user@smachine:/smartCampuz$ sudo su postgres
postgres@smachine:/smartCampuz$ psql template1
Once you are loged in, you should create a user.
template1=# CREATE USER <myUser> WITH PASSWORD '<myPassword>';
\q
exit
Without logging out from posrtgres
account, execute the resetDB.sh script. This will create a database named
smartcampuz owned by a user named smartuser. If you want to change those values you can manually replace-them-all with
your chosen one.
postgres@smachine:/smartCampuz$ sh resetDB.sh
Now locate and set the "" and "" in /GitHub/smartCampUZ/src/main/resources/application.properties (the following are the default ones in the project):
#Username and password
spring.datasource.username=smartuser
spring.datasource.password=smartpass
In order to check that everything is working correctly, you can execute the commands gradle build
or gradle check
.
You can run the application use the following commands:
-
Deploying Open a terminal in project source directory and type the command
gradle bootRun
. That deploys an Spring server in http://localhost:8080, using the files located on the project's source directory. -
Rebuilding Thanks to DevTools package the server will auto-reload each time a binary changes. In order to update the binaries from your IDE, compile/make the project. (Ctrl+F9 in IntelliJ)
-
Stopping A Spring Server is not designed to be shut down so the unique way is by killing the procces with
Ctrl + C
.
Gradle allows you to run the tests defined on src/test with gradle test
.
Note that gradle check
and gradle build
will also execute the tests.
You can indicate gradle no to run them with the pervios mentioned commands using the -x test
option, i.e gralde build -x test
.
Another way to prevent the test from being executed is to add the "@Ignore" annotation before the test class declaration.
EditorConfig helps developers maintain consistent coding styles between different editors and IDEs. It is a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. You need to create a .editorconfig file in which you define the coding style rules. It is similar to the format accepted by gitignore.
These editors come bundled with native support for EditorConfig. Everything should just work: BBEdit, Builder, CLion, GitHub, Gogs, IntelliJIDEA, RubyMine, SourceLair, TortoiseGit, WebStorm.
To use EditorConfig with one of these editors, you will need to install a plugin: AppCode, Atom, Brackets, Coda, Code::Blocks, Eclipse, Emacs, Geany, Gedit, Jedit, Komodo, NetBeans, NotePadd++, PhpStorm, PyCharm, Sublime Text, Textadept, textmate, Vim, Visual Studio, Visual Studio Code, Xcode