For the user documentation see our Wiki: https://github.com/JUGDortmund/Tar/wiki
- Checkout
- mvn spring-boot:run
Embedded MongoDB runs on port 28018 (when in dev profile)
The application defines three basic configuration environments (called "Profiles" in Spring context): localDev, test, seviceTest. The basic profiles are stored in application.yaml in src/main/resources and are configured to ensure local development and testing. By default, the application runs in localDev profile.
For other profiles a seperate configuration file named with a starting "application-" and the profile name is needed. To disable connections to external services, include "dummyServices" in profile. It can be separated into "dummyLdapService", "dummyCalenderService" and "dummyMailService". The mail service always has to be specified.
Overview of services: Mail:
- dummyMailService
- smtpMailService
- exchangeMailService
Calendar:
- dummyCalendarService
- exchangeCalendarService (default)
Ldap (Authorisation):
- dummyLdapService
- ldapService (default)
The default profile can be overwritten by setting the following system property from the command line:
-Dspring.profiles.active=
To overwrite the active profile is recommended when using other profiles than "localDev" environment.
To use the test profile, all test classes have to use the following annotation:
@ActiveProfile("test")
To use the serviceTest profile, all test classes which are used to test external services (e.g. mail) have to use the following annotation:
@ActiveProfile("serviceTest")
When starting the application in a profile that uses the dummyLdapService (like localDev, dev or stage), the authentication is using a local user management with defined users in dummy-user.yaml. There are only three users "user1", "user2" and "supervisor" with password "login". When using other profiles, the LDAP-authentication is required and a group-mapping to application authorities in the group-mapping.yaml has to be configured.
To enable a default styleguide for both ide's: Intellij and eclipse, we defined the google-styleguide as default code style.
- Locate google-styleguide for IntelliJ: intellij-java-google-style.xml
- Move the intellij-java-google-style.xml to ${User}/Library/Preferences/IntelliJIdea${Version}/
- Restart IntelliJ
- Enable the google-styleguide by Preferences > Editor CodeStyle > Scheme : GoogleStyle
- Enable auto-code-style by commit by checking Before Commit > Reformat Code in screen 'Commit Changes (cmd+K)'
- Locate google-styleguide for IntelliJ: intellij-java-google-style.xml
- Move the intellij-java-google-style.xml to ${User}/Library/Preferences/IdeaIC${Version}/codestyles/
- Restart IntelliJ
- Enable the google-styleguide by Preferences > Editor CodeStyle > Scheme : GoogleStyle
- Enable auto-code-style by commit by checking Before Commit > Reformat Code in screen 'Commit Changes (cmd+K)'
- Locate google-styleguide for Eclipse: eclipse-java-google-style.xml
- Import google-styleguide in Eclipse via Preferences > Java > Code Style > Import...
- Enable google-styleguide in Eclipse via Preferences > Java > Code Style : GoogleStyle
- Enable auto-code-style on save in Eclipse via Preferences > Java > Editor > Save Actions