Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

6 miesięcy temu
6 miesięcy temu
6 miesięcy temu
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # 2Fi LIONER Backend Setup
  2. ## 1. Create MySQL database
  3. - Run the following command in MySQL
  4. ```
  5. CREATE SCHEMA `lionerdb` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
  6. ```
  7. ## 2. Edit the config to match with the environment
  8. - application-db-local.yml
  9. - Update the MySQL database location & login info:
  10. ```
  11. spring:
  12. datasource:
  13. jdbc-url: jdbc:mysql://127.0.0.1:3308/lionerdb?useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8
  14. username: root
  15. password: secret
  16. ```
  17. ## 3. Configurations for VScode
  18. - Build the **launch.json** & **settings.json** files, put them in **.vscode** folder and paste the following code:
  19. - **launch.json**
  20. ```
  21. {
  22. // Use IntelliSense to learn about possible attributes.
  23. // Hover to view descriptions of existing attributes.
  24. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  25. "version": "0.2.0",
  26. "configurations": [
  27. {
  28. "type": "java",
  29. "name": "Launch Local",
  30. "request": "launch",
  31. "mainClass": "com.ffii.lioner.LionerApplication",
  32. "console": "internalConsole",
  33. // "projectName": "LIONER",
  34. "vmArgs": "-Xms2g -Xmx4g",
  35. "args": "--spring.profiles.active=db-local,ldap-local,local"
  36. }
  37. ]
  38. }
  39. ```
  40. - **settings.json**
  41. - Modify the java sdk directory if necessary
  42. ```
  43. {
  44. "java.configuration.updateBuildConfiguration": "interactive",
  45. "java.jdt.ls.java.home": "C:\\java\\jdk-17.0.8",
  46. "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx4G -Xms100m -Xlog:disable"
  47. }
  48. ```
  49. ## 4. Run the application
  50. - Run the application in VScode