Sfoglia il codice sorgente

Upgraded to latest version of Ionic (3.19.1) and Spring Boot (1.5.10)

 Upgraded to latest version of Ionic and Spring Boot
Matt Raible 6 anni fa
parent
commit
91d0f37cdb
No account linked to committer's email
94 ha cambiato i file con 6304 aggiunte e 274 eliminazioni
  1. 1
    1
      README.md
  2. 1
    1
      deploy.sh
  3. 1
    0
      ionic-beer/.gitignore
  4. 0
    26
      ionic-beer/README.md
  5. 11
    13
      ionic-beer/config.xml
  6. 4
    1
      ionic-beer/ionic.config.json
  7. 6090
    0
      ionic-beer/package-lock.json
  8. 55
    59
      ionic-beer/package.json
  9. 8
    0
      ionic-beer/resources/README.md
  10. BIN
      ionic-beer/resources/android/icon/drawable-hdpi-icon.png
  11. BIN
      ionic-beer/resources/android/icon/drawable-ldpi-icon.png
  12. BIN
      ionic-beer/resources/android/icon/drawable-mdpi-icon.png
  13. BIN
      ionic-beer/resources/android/icon/drawable-xhdpi-icon.png
  14. BIN
      ionic-beer/resources/android/icon/drawable-xxhdpi-icon.png
  15. BIN
      ionic-beer/resources/android/icon/drawable-xxxhdpi-icon.png
  16. BIN
      ionic-beer/resources/android/splash/drawable-land-hdpi-screen.png
  17. BIN
      ionic-beer/resources/android/splash/drawable-land-ldpi-screen.png
  18. BIN
      ionic-beer/resources/android/splash/drawable-land-mdpi-screen.png
  19. BIN
      ionic-beer/resources/android/splash/drawable-land-xhdpi-screen.png
  20. BIN
      ionic-beer/resources/android/splash/drawable-land-xxhdpi-screen.png
  21. BIN
      ionic-beer/resources/android/splash/drawable-land-xxxhdpi-screen.png
  22. BIN
      ionic-beer/resources/android/splash/drawable-port-hdpi-screen.png
  23. BIN
      ionic-beer/resources/android/splash/drawable-port-ldpi-screen.png
  24. BIN
      ionic-beer/resources/android/splash/drawable-port-mdpi-screen.png
  25. BIN
      ionic-beer/resources/android/splash/drawable-port-xhdpi-screen.png
  26. BIN
      ionic-beer/resources/android/splash/drawable-port-xxhdpi-screen.png
  27. BIN
      ionic-beer/resources/android/splash/drawable-port-xxxhdpi-screen.png
  28. BIN
      ionic-beer/resources/ios/icon/icon-1024.png
  29. BIN
      ionic-beer/resources/ios/icon/icon-40.png
  30. BIN
      ionic-beer/resources/ios/icon/icon-40@2x.png
  31. BIN
      ionic-beer/resources/ios/icon/icon-50.png
  32. BIN
      ionic-beer/resources/ios/icon/icon-50@2x.png
  33. BIN
      ionic-beer/resources/ios/icon/icon-60.png
  34. BIN
      ionic-beer/resources/ios/icon/icon-60@2x.png
  35. BIN
      ionic-beer/resources/ios/icon/icon-60@3x.png
  36. BIN
      ionic-beer/resources/ios/icon/icon-72.png
  37. BIN
      ionic-beer/resources/ios/icon/icon-72@2x.png
  38. BIN
      ionic-beer/resources/ios/icon/icon-76.png
  39. BIN
      ionic-beer/resources/ios/icon/icon-76@2x.png
  40. BIN
      ionic-beer/resources/ios/icon/icon-small.png
  41. BIN
      ionic-beer/resources/ios/icon/icon-small@2x.png
  42. BIN
      ionic-beer/resources/ios/icon/icon-small@3x.png
  43. BIN
      ionic-beer/resources/ios/icon/icon.png
  44. BIN
      ionic-beer/resources/ios/icon/icon@2x.png
  45. BIN
      ionic-beer/resources/ios/splash/Default-568h@2x~iphone.png
  46. BIN
      ionic-beer/resources/ios/splash/Default-667h.png
  47. BIN
      ionic-beer/resources/ios/splash/Default-736h.png
  48. BIN
      ionic-beer/resources/ios/splash/Default-Landscape-736h.png
  49. BIN
      ionic-beer/resources/ios/splash/Default-Landscape@2x~ipad.png
  50. BIN
      ionic-beer/resources/ios/splash/Default-Landscape~ipad.png
  51. BIN
      ionic-beer/resources/ios/splash/Default-Portrait@2x~ipad.png
  52. BIN
      ionic-beer/resources/ios/splash/Default-Portrait~ipad.png
  53. BIN
      ionic-beer/resources/ios/splash/Default@2x~iphone.png
  54. BIN
      ionic-beer/resources/ios/splash/Default@2x~universal~anyany.png
  55. BIN
      ionic-beer/resources/ios/splash/Default~iphone.png
  56. BIN
      ionic-beer/resources/splash.png
  57. 3
    2
      ionic-beer/src/app/app.module.ts
  58. 1
    1
      ionic-beer/src/app/app.scss
  59. BIN
      ionic-beer/src/assets/imgs/logo.png
  60. 0
    14
      ionic-beer/src/declarations.d.ts
  61. 13
    2
      ionic-beer/src/index.html
  62. 1
    1
      ionic-beer/src/pages/beer/beer-modal.ts
  63. 0
    3
      ionic-beer/src/pages/beer/beer.module.ts
  64. 1
    1
      ionic-beer/src/pages/contact/contact.html
  65. 2
    2
      ionic-beer/src/pages/tabs/tabs.html
  66. 0
    1
      ionic-beer/src/pages/tabs/tabs.ts
  67. 9
    14
      ionic-beer/src/providers/beer-service.ts
  68. 9
    9
      ionic-beer/src/providers/giphy-service.ts
  69. 3
    2
      ionic-beer/src/service-worker.js
  70. 13
    3
      ionic-beer/src/theme/variables.scss
  71. 4
    2
      ionic-beer/tsconfig.json
  72. BIN
      server/.mvn/wrapper/maven-wrapper.jar
  73. 1
    1
      server/.mvn/wrapper/maven-wrapper.properties
  74. 0
    15
      server/README.md
  75. 43
    51
      server/mvnw
  76. 3
    5
      server/mvnw.cmd
  77. 2
    3
      server/pom.xml
  78. 0
    29
      server/src/main/java/com/example/DemoApplication.java
  79. 12
    0
      server/src/main/java/com/example/demo/DemoApplication.java
  80. 2
    2
      server/src/main/java/com/example/demo/beer/Beer.java
  81. 4
    3
      server/src/main/java/com/example/demo/beer/BeerCommandLineRunner.java
  82. 3
    3
      server/src/main/java/com/example/demo/beer/BeerController.java
  83. 3
    3
      server/src/main/java/com/example/demo/beer/BeerRepository.java
  84. 1
    1
      server/src/test/java/com/example/demo/DemoApplicationTests.java
  85. BIN
      static/android-beer-list.png
  86. BIN
      static/beer-delete.png
  87. BIN
      static/beer-modal.png
  88. BIN
      static/good-beers-json.png
  89. BIN
      static/good-beers-ui.png
  90. BIN
      static/ionic-labs.png
  91. BIN
      static/ionic-tabs.png
  92. BIN
      static/iphone-beer-list.jpg
  93. BIN
      static/lighthouse-51.png
  94. BIN
      static/no-http-provider.png

+ 1
- 1
README.md Vedi File

@@ -2,7 +2,7 @@
2 2
 
3 3
 This project is an example application for a typical [Ionic](https://ionicframework.com/) app with a [Spring Boot](https://projects.spring.io/spring-boot/) backend.
4 4
 
5
-You can read about how this application was created in [this tutorial](http://developer.okta.com/blog/2017/05/17/develop-a-mobile-app-with-ionic-and-spring-boot). Feel free to copy any code in this project for your own use in accordance with the [Apache license](LICENSE).
5
+You can read about how this application was created in [Develop a Mobile App With Ionic and Spring Boot](http://developer.okta.com/blog/2017/05/17/develop-a-mobile-app-with-ionic-and-spring-boot). Feel free to copy any code in this project for your own use in accordance with the [Apache license](LICENSE).
6 6
 
7 7
 **Prerequisites**: Java 8 and Node.js.
8 8
 

+ 1
- 1
deploy.sh Vedi File

@@ -63,5 +63,5 @@ ionic cordova run ios
63 63
 # See http://stackoverflow.com/a/43363820
64 64
 
65 65
 # cleanup changed files
66
-git checkout $r/ionic-beer
66
+sed -i -e "s|$serverUri|http://localhost:8080|g" src/providers/beer-service.ts
67 67
 rm $r/ionic-beer/src/providers/beer-service.ts-e

+ 1
- 0
ionic-beer/.gitignore Vedi File

@@ -13,6 +13,7 @@ log.txt
13 13
 npm-debug.log*
14 14
 
15 15
 .idea/
16
+.sourcemaps/
16 17
 .sass-cache/
17 18
 .tmp/
18 19
 .versions/

+ 0
- 26
ionic-beer/README.md Vedi File

@@ -1,26 +0,0 @@
1
-This is a starter template for [Ionic](http://ionicframework.com/docs/) projects.
2
-
3
-## How to use this template
4
-
5
-*This template does not work on its own*. The shared files for each starter are found in the [ionic2-app-base repo](https://github.com/driftyco/ionic2-app-base).
6
-
7
-To use this template, either create a new ionic project using the ionic node.js utility, or copy the files from this repository into the [Starter App Base](https://github.com/driftyco/ionic2-app-base).
8
-
9
-### With the Ionic CLI:
10
-
11
-Take the name after `ionic2-starter-`, and that is the name of the template to be used when using the `ionic start` command below:
12
-
13
-```bash
14
-$ sudo npm install -g ionic cordova
15
-$ ionic start myTabs tabs
16
-```
17
-
18
-Then, to run it, cd into `myTabs` and run:
19
-
20
-```bash
21
-$ ionic cordova platform add ios
22
-$ ionic cordova run ios
23
-```
24
-
25
-Substitute ios for android if not on a Mac.
26
-

+ 11
- 13
ionic-beer/config.xml Vedi File

@@ -1,20 +1,17 @@
1 1
 <?xml version='1.0' encoding='utf-8'?>
2 2
 <widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3
-    <name>MyApp</name>
3
+    <name>ionic-beer</name>
4 4
     <description>An awesome Ionic/Cordova app.</description>
5 5
     <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
6 6
     <content src="index.html" />
7 7
     <access origin="*" />
8
-    <allow-navigation href="http://ionic.local/*" />
9 8
     <allow-intent href="http://*/*" />
10 9
     <allow-intent href="https://*/*" />
11 10
     <allow-intent href="tel:*" />
12 11
     <allow-intent href="sms:*" />
13 12
     <allow-intent href="mailto:*" />
14 13
     <allow-intent href="geo:*" />
15
-    <preference name="webviewbounce" value="false" />
16
-    <preference name="UIWebViewBounce" value="false" />
17
-    <preference name="DisallowOverscroll" value="true" />
14
+    <preference name="ScrollEnabled" value="false" />
18 15
     <preference name="android-minSdkVersion" value="16" />
19 16
     <preference name="BackupWebStorage" value="none" />
20 17
     <preference name="SplashMaintainAspectRatio" value="true" />
@@ -64,6 +61,7 @@
64 61
         <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
65 62
         <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
66 63
         <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
64
+        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
67 65
         <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
68 66
         <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
69 67
         <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
@@ -76,13 +74,13 @@
76 74
         <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
77 75
         <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
78 76
         <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
77
+        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
79 78
     </platform>
80
-    <engine name="android" spec="^6.2.3" />
81
-    <engine name="ios" spec="^4.4.0" />
82
-    <plugin name="cordova-plugin-console" spec="^1.0.5" />
83
-    <plugin name="cordova-plugin-device" spec="^1.1.4" />
84
-    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
85
-    <plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
86
-    <plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
87
-    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
79
+    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
80
+    <plugin name="cordova-plugin-device" spec="^2.0.1" />
81
+    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
82
+    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
83
+    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
84
+    <engine name="ios" spec="4.5.4" />
85
+    <engine name="android" spec="~7.0.0" />
88 86
 </widget>

+ 4
- 1
ionic-beer/ionic.config.json Vedi File

@@ -1,5 +1,8 @@
1 1
 {
2 2
   "name": "ionic-beer",
3 3
   "app_id": "",
4
-  "type": "ionic-angular"
4
+  "type": "ionic-angular",
5
+  "integrations": {
6
+    "cordova": {}
7
+  }
5 8
 }

+ 6090
- 0
ionic-beer/package-lock.json
File diff suppressed because it is too large
Vedi File


+ 55
- 59
ionic-beer/package.json Vedi File

@@ -1,62 +1,58 @@
1 1
 {
2
-    "name": "ionic-beer",
3
-    "version": "0.0.1",
4
-    "author": "Ionic Framework",
5
-    "homepage": "http://ionicframework.com/",
6
-    "private": true,
7
-    "scripts": {
8
-        "clean": "ionic-app-scripts clean",
9
-        "build": "ionic-app-scripts build",
10
-        "lint": "ionic-app-scripts lint",
11
-        "ionic:build": "ionic-app-scripts build",
12
-        "ionic:serve": "ionic-app-scripts serve"
2
+  "name": "ionic-beer",
3
+  "version": "0.0.1",
4
+  "author": "Ionic Framework",
5
+  "homepage": "http://ionicframework.com/",
6
+  "private": true,
7
+  "scripts": {
8
+    "clean": "ionic-app-scripts clean",
9
+    "build": "ionic-app-scripts build",
10
+    "lint": "ionic-app-scripts lint",
11
+    "ionic:build": "ionic-app-scripts build",
12
+    "ionic:serve": "ionic-app-scripts serve"
13
+  },
14
+  "dependencies": {
15
+    "@angular/common": "5.0.3",
16
+    "@angular/compiler": "5.0.3",
17
+    "@angular/compiler-cli": "5.0.3",
18
+    "@angular/core": "5.0.3",
19
+    "@angular/forms": "5.0.3",
20
+    "@angular/http": "5.0.3",
21
+    "@angular/platform-browser": "5.0.3",
22
+    "@angular/platform-browser-dynamic": "5.0.3",
23
+    "@ionic-native/core": "4.4.0",
24
+    "@ionic-native/splash-screen": "4.4.0",
25
+    "@ionic-native/status-bar": "4.4.0",
26
+    "@ionic/storage": "2.1.3",
27
+    "cordova-android": "7.0.0",
28
+    "cordova-ios": "4.5.4",
29
+    "cordova-plugin-device": "^2.0.1",
30
+    "cordova-plugin-ionic-keyboard": "^2.0.5",
31
+    "cordova-plugin-ionic-webview": "^1.1.16",
32
+    "cordova-plugin-splashscreen": "^5.0.2",
33
+    "cordova-plugin-whitelist": "^1.3.3",
34
+    "ionic-angular": "3.9.2",
35
+    "ionicons": "3.0.0",
36
+    "rxjs": "5.5.2",
37
+    "sw-toolbox": "3.6.0",
38
+    "zone.js": "0.8.18"
39
+  },
40
+  "devDependencies": {
41
+    "@ionic/app-scripts": "3.1.8",
42
+    "typescript": "2.4.2"
43
+  },
44
+  "description": "An Ionic project",
45
+  "cordova": {
46
+    "plugins": {
47
+      "cordova-plugin-whitelist": {},
48
+      "cordova-plugin-device": {},
49
+      "cordova-plugin-splashscreen": {},
50
+      "cordova-plugin-ionic-webview": {},
51
+      "cordova-plugin-ionic-keyboard": {}
13 52
     },
14
-    "dependencies": {
15
-        "@angular/common": "4.1.0",
16
-        "@angular/compiler": "4.1.0",
17
-        "@angular/compiler-cli": "4.1.0",
18
-        "@angular/core": "4.1.0",
19
-        "@angular/forms": "4.1.0",
20
-        "@angular/http": "4.1.0",
21
-        "@angular/platform-browser": "4.1.0",
22
-        "@angular/platform-browser-dynamic": "4.1.0",
23
-        "@ionic-native/core": "3.7.0",
24
-        "@ionic-native/splash-screen": "3.7.0",
25
-        "@ionic-native/status-bar": "3.7.0",
26
-        "@ionic/storage": "2.0.1",
27
-        "cordova-android": "^6.2.3",
28
-        "cordova-ios": "^4.4.0",
29
-        "cordova-plugin-console": "^1.0.5",
30
-        "cordova-plugin-device": "^1.1.4",
31
-        "cordova-plugin-splashscreen": "^4.0.3",
32
-        "cordova-plugin-statusbar": "^2.2.2",
33
-        "cordova-plugin-whitelist": "^1.3.1",
34
-        "ionic-angular": "3.2.1",
35
-        "ionic-plugin-keyboard": "^2.2.1",
36
-        "ionicons": "3.0.0",
37
-        "rxjs": "5.1.1",
38
-        "sw-toolbox": "3.6.0",
39
-        "zone.js": "0.8.10"
40
-    },
41
-    "devDependencies": {
42
-        "@ionic/app-scripts": "1.3.7",
43
-        "@ionic/cli-plugin-cordova": "1.4.0",
44
-        "@ionic/cli-plugin-ionic-angular": "1.3.1",
45
-        "typescript": "2.2.1"
46
-    },
47
-    "description": "An Ionic project",
48
-    "cordova": {
49
-        "plugins": {
50
-            "cordova-plugin-console": {},
51
-            "cordova-plugin-device": {},
52
-            "cordova-plugin-splashscreen": {},
53
-            "cordova-plugin-statusbar": {},
54
-            "cordova-plugin-whitelist": {},
55
-            "ionic-plugin-keyboard": {}
56
-        },
57
-        "platforms": [
58
-            "android",
59
-            "ios"
60
-        ]
61
-    }
53
+    "platforms": [
54
+      "ios",
55
+      "android"
56
+    ]
57
+  }
62 58
 }

+ 8
- 0
ionic-beer/resources/README.md Vedi File

@@ -0,0 +1,8 @@
1
+These are Cordova resources. You can replace icon.png and splash.png and run
2
+`ionic cordova resources` to generate custom icons and splash screens for your
3
+app. See `ionic cordova resources --help` for details.
4
+
5
+Cordova reference documentation:
6
+
7
+- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8
+- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/

BIN
ionic-beer/resources/android/icon/drawable-hdpi-icon.png Vedi File


BIN
ionic-beer/resources/android/icon/drawable-ldpi-icon.png Vedi File


BIN
ionic-beer/resources/android/icon/drawable-mdpi-icon.png Vedi File


BIN
ionic-beer/resources/android/icon/drawable-xhdpi-icon.png Vedi File


BIN
ionic-beer/resources/android/icon/drawable-xxhdpi-icon.png Vedi File


BIN
ionic-beer/resources/android/icon/drawable-xxxhdpi-icon.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-land-hdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-land-ldpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-land-mdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-land-xhdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-land-xxhdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-land-xxxhdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-port-hdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-port-ldpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-port-mdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-port-xhdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-port-xxhdpi-screen.png Vedi File


BIN
ionic-beer/resources/android/splash/drawable-port-xxxhdpi-screen.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-1024.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-40.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-40@2x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-50.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-50@2x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-60.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-60@2x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-60@3x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-72.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-72@2x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-76.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-76@2x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-small.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-small@2x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon-small@3x.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon.png Vedi File


BIN
ionic-beer/resources/ios/icon/icon@2x.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-568h@2x~iphone.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-667h.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-736h.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-Landscape-736h.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-Landscape@2x~ipad.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-Landscape~ipad.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-Portrait@2x~ipad.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default-Portrait~ipad.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default@2x~iphone.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default@2x~universal~anyany.png Vedi File


BIN
ionic-beer/resources/ios/splash/Default~iphone.png Vedi File


BIN
ionic-beer/resources/splash.png Vedi File


+ 3
- 2
ionic-beer/src/app/app.module.ts Vedi File

@@ -10,8 +10,9 @@ import { TabsPage } from '../pages/tabs/tabs';
10 10
 
11 11
 import { StatusBar } from '@ionic-native/status-bar';
12 12
 import { SplashScreen } from '@ionic-native/splash-screen';
13
+
13 14
 import { BeerPageModule } from '../pages/beer/beer.module';
14
-import { HttpModule } from '@angular/http';
15
+import { HttpClientModule } from '@angular/common/http';
15 16
 
16 17
 @NgModule({
17 18
   declarations: [
@@ -23,7 +24,7 @@ import { HttpModule } from '@angular/http';
23 24
   ],
24 25
   imports: [
25 26
     BrowserModule,
26
-    HttpModule,
27
+    HttpClientModule,
27 28
     IonicModule.forRoot(MyApp),
28 29
     BeerPageModule
29 30
   ],

+ 1
- 1
ionic-beer/src/app/app.scss Vedi File

@@ -1,4 +1,4 @@
1
-// http://ionicframework.com/docs/v2/theming/
1
+// http://ionicframework.com/docs/theming/
2 2
 
3 3
 
4 4
 // App Global Sass

BIN
ionic-beer/src/assets/imgs/logo.png Vedi File


+ 0
- 14
ionic-beer/src/declarations.d.ts Vedi File

@@ -1,14 +0,0 @@
1
-/*
2
-  Declaration files are how the Typescript compiler knows about the type information(or shape) of an object.
3
-  They're what make intellisense work and make Typescript know all about your code.
4
-
5
-  A wildcard module is declared below to allow third party libraries to be used in an app even if they don't
6
-  provide their own type declarations.
7
-
8
-  To learn more about using third party libraries in an Ionic app, check out the docs here:
9
-  http://ionicframework.com/docs/v2/resources/third-party-libs/
10
-
11
-  For more info on type definition files, check out the Typescript docs here:
12
-  https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html
13
-*/
14
-declare module '*';

+ 13
- 2
ionic-beer/src/index.html Vedi File

@@ -11,7 +11,11 @@
11 11
   <link rel="manifest" href="manifest.json">
12 12
   <meta name="theme-color" content="#4e8ef7">
13 13
 
14
-  <!-- cordova.js required for cordova apps -->
14
+  <!-- add to homescreen for ios -->
15
+  <meta name="apple-mobile-web-app-capable" content="yes">
16
+  <meta name="apple-mobile-web-app-status-bar-style" content="black">
17
+
18
+  <!-- cordova.js required for cordova apps (remove if not needed) -->
15 19
   <script src="cordova.js"></script>
16 20
 
17 21
   <script>
@@ -26,6 +30,9 @@
26 30
 
27 31
 </head>
28 32
 <body>
33
+<noscript>
34
+  <h1>You must enable JavaScript to view this page.</h1>
35
+</noscript>
29 36
 
30 37
   <!-- Ionic's root component and where the app will load -->
31 38
   <ion-app></ion-app>
@@ -33,7 +40,11 @@
33 40
   <!-- The polyfills js is generated during the build process -->
34 41
   <script src="build/polyfills.js"></script>
35 42
 
36
-  <!-- The bundle js is generated during the build process -->
43
+  <!-- The vendor js is generated during the build process
44
+       It contains all of the dependencies in node_modules -->
45
+  <script src="build/vendor.js"></script>
46
+
47
+  <!-- The main bundle js is generated during the build process -->
37 48
   <script src="build/main.js"></script>
38 49
 
39 50
 </body>

+ 1
- 1
ionic-beer/src/pages/beer/beer-modal.ts Vedi File

@@ -19,7 +19,7 @@ export class BeerModalPage {
19 19
               public toastCtrl: ToastController,
20 20
               public navCtrl: NavController) {
21 21
     if (this.params.data.id) {
22
-      this.beerService.get(this.params.get('id')).subscribe(beer => {
22
+      this.beerService.get(this.params.get('id')).subscribe((beer: any) => {
23 23
         this.beer = beer;
24 24
         this.beer.href = beer._links.self.href;
25 25
         this.giphyService.get(beer.name).subscribe(url => beer.giphyUrl = url);

+ 0
- 3
ionic-beer/src/pages/beer/beer.module.ts Vedi File

@@ -13,9 +13,6 @@ import { BeerModalPage } from './beer-modal';
13 13
   imports: [
14 14
     IonicPageModule.forChild(BeerPage),
15 15
   ],
16
-  exports: [
17
-    BeerPage
18
-  ],
19 16
   providers: [
20 17
     BeerService,
21 18
     GiphyService

+ 1
- 1
ionic-beer/src/pages/contact/contact.html Vedi File

@@ -10,7 +10,7 @@
10 10
   <ion-list>
11 11
     <ion-list-header>Follow us on Twitter</ion-list-header>
12 12
     <ion-item>
13
-      <ion-icon name="ionic" item-left></ion-icon>
13
+      <ion-icon name="ionic" item-start></ion-icon>
14 14
       @ionicframework
15 15
     </ion-item>
16 16
   </ion-list>

+ 2
- 2
ionic-beer/src/pages/tabs/tabs.html Vedi File

@@ -1,6 +1,6 @@
1 1
 <ion-tabs>
2 2
   <ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
3 3
   <ion-tab [root]="tab2Root" tabTitle="Beer" tabIcon="beer"></ion-tab>
4
-  <ion-tab [root]="tab3Root" tabTitle="About" tabIcon="information-circle"></ion-tab>
5
-  <ion-tab [root]="tab4Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
4
+  <ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
5
+  <ion-tab [root]="tab4Root" tabTitle="About" tabIcon="information-circle"></ion-tab>
6 6
 </ion-tabs>

+ 0
- 1
ionic-beer/src/pages/tabs/tabs.ts Vedi File

@@ -9,7 +9,6 @@ import { BeerPage } from '../beer/beer';
9 9
   templateUrl: 'tabs.html'
10 10
 })
11 11
 export class TabsPage {
12
-
13 12
   tab1Root = HomePage;
14 13
   tab2Root = BeerPage;
15 14
   tab3Root = AboutPage;

+ 9
- 14
ionic-beer/src/providers/beer-service.ts Vedi File

@@ -1,39 +1,34 @@
1 1
 import { Injectable } from '@angular/core';
2
-import { Http, Response } from '@angular/http';
3
-import 'rxjs/add/operator/map';
4
-import 'rxjs/add/operator/catch';
5 2
 import { Observable } from 'rxjs';
3
+import { HttpClient } from '@angular/common/http';
6 4
 
7 5
 @Injectable()
8 6
 export class BeerService {
9
-  public API = 'http://localhost:8080';
7
+  public API = 'http://192.168.1.48:8080';
10 8
   public BEER_API = this.API + '/beers';
11 9
 
12
-  constructor(public http: Http) {}
10
+  constructor(public http: HttpClient) {
11
+  }
13 12
 
14 13
   getGoodBeers(): Observable<any> {
15
-    return this.http.get(this.API + '/good-beers')
16
-      .map((response: Response) => response.json());
14
+    return this.http.get(this.API + '/good-beers');
17 15
   }
18 16
 
19 17
   get(id: string) {
20
-    return this.http.get(this.BEER_API + '/' + id)
21
-      .map((response: Response) => response.json());
18
+    return this.http.get(this.BEER_API + '/' + id);
22 19
   }
23 20
 
24 21
   save(beer: any): Observable<any> {
25
-    let result: Observable<Response>;
22
+    let result: Observable<Object>;
26 23
     if (beer['href']) {
27 24
       result = this.http.put(beer.href, beer);
28 25
     } else {
29 26
       result = this.http.post(this.BEER_API, beer)
30 27
     }
31
-    return result.map((response: Response) => response.json())
32
-      .catch(error => Observable.throw(error));
28
+    return result.catch(error => Observable.throw(error));
33 29
   }
34 30
 
35 31
   remove(id: string) {
36
-    return this.http.delete(this.BEER_API + '/' + id)
37
-      .map((response: Response) => response.json());
32
+    return this.http.delete(this.BEER_API + '/' + id);
38 33
   }
39 34
 }

+ 9
- 9
ionic-beer/src/providers/giphy-service.ts Vedi File

@@ -1,22 +1,22 @@
1 1
 import { Injectable } from '@angular/core';
2
-import { Http, Response } from '@angular/http';
3
-import { Observable } from 'rxjs';
2
+import { HttpClient } from '@angular/common/http';
3
+import 'rxjs/add/operator/map';
4 4
 
5 5
 @Injectable()
6 6
 // http://tutorials.pluralsight.com/front-end-javascript/getting-started-with-angular-2-by-building-a-giphy-search-application
7 7
 export class GiphyService {
8 8
 
9
-  giphyApi = 'https://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&q=';
9
+  // Public beta key: https://github.com/Giphy/GiphyAPI#public-beta-key
10
+  giphyApi = 'https://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&limit=1&q=';
10 11
 
11
-  constructor(public http: Http) {
12
+  constructor(public http: HttpClient) {
12 13
   }
13 14
 
14
-  get(searchTerm): Observable<any> {
15
+  get(searchTerm) {
15 16
     const apiLink = this.giphyApi + searchTerm;
16
-    return this.http.request(apiLink).map((res: Response) => {
17
-      const results = res.json().data;
18
-      if (results.length > 0) {
19
-        return results[0].images.original.url;
17
+    return this.http.get(apiLink).map((response: any) => {
18
+      if (response.data.length > 0) {
19
+        return response.data[0].images.original.url;
20 20
       } else {
21 21
         return 'https://media.giphy.com/media/YaOxRsmrv9IeA/giphy.gif'; // dancing cat for 404
22 22
       }

+ 3
- 2
ionic-beer/src/service-worker.js Vedi File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Check out https://googlechrome.github.io/sw-toolbox/ for
2
+ * Check out https://googlechromelabs.github.io/sw-toolbox/ for
3 3
  * more info on how to use sw-toolbox to custom configure your service worker.
4 4
  */
5 5
 
@@ -15,6 +15,7 @@ self.toolbox.options.cache = {
15 15
 self.toolbox.precache(
16 16
   [
17 17
     './build/main.js',
18
+    './build/vendor.js',
18 19
     './build/main.css',
19 20
     './build/polyfills.js',
20 21
     'index.html',
@@ -23,7 +24,7 @@ self.toolbox.precache(
23 24
 );
24 25
 
25 26
 // dynamically cache any other local assets
26
-self.toolbox.router.any('/*', self.toolbox.cacheFirst);
27
+self.toolbox.router.any('/*', self.toolbox.fastest);
27 28
 
28 29
 // for any other requests go to the network, cache,
29 30
 // and then only use that cached resource if your user goes offline

+ 13
- 3
ionic-beer/src/theme/variables.scss Vedi File

@@ -1,7 +1,17 @@
1 1
 // Ionic Variables and Theming. For more info, please see:
2
-// http://ionicframework.com/docs/v2/theming/
2
+// http://ionicframework.com/docs/theming/
3
+
4
+// Font path is used to include ionicons,
5
+// roboto, and noto sans fonts
3 6
 $font-path: "../assets/fonts";
4 7
 
8
+
9
+// The app direction is used to include
10
+// rtl styles in your app. For more info, please see:
11
+// http://ionicframework.com/docs/theming/rtl-support/
12
+$app-direction: ltr;
13
+
14
+
5 15
 @import "ionic.globals";
6 16
 
7 17
 
@@ -10,7 +20,7 @@ $font-path: "../assets/fonts";
10 20
 // To customize the look and feel of this app, you can override
11 21
 // the Sass variables found in Ionic's source scss files.
12 22
 // To view all the possible Ionic variables, see:
13
-// http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/
23
+// http://ionicframework.com/docs/theming/overriding-ionic-variables/
14 24
 
15 25
 
16 26
 
@@ -66,7 +76,7 @@ $colors: (
66 76
 // Ionicons
67 77
 // --------------------------------------------------
68 78
 // The premium icon font for Ionic. For more info, please see:
69
-// http://ionicframework.com/docs/v2/ionicons/
79
+// http://ionicframework.com/docs/ionicons/
70 80
 
71 81
 @import "ionic.ionicons";
72 82
 

+ 4
- 2
ionic-beer/tsconfig.json Vedi File

@@ -17,10 +17,12 @@
17 17
     "src/**/*.ts"
18 18
   ],
19 19
   "exclude": [
20
-    "node_modules"
20
+    "node_modules",
21
+    "src/**/*.spec.ts",
22
+    "src/**/__tests__/*.ts"
21 23
   ],
22 24
   "compileOnSave": false,
23 25
   "atom": {
24 26
     "rewriteTsconfig": false
25 27
   }
26
-}
28
+}

BIN
server/.mvn/wrapper/maven-wrapper.jar Vedi File


+ 1
- 1
server/.mvn/wrapper/maven-wrapper.properties Vedi File

@@ -1 +1 @@
1
-distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
1
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip

+ 0
- 15
server/README.md Vedi File

@@ -1,15 +0,0 @@
1
-## Spring Boot with Stormpath
2
-
3
-If you already have Stormpath configured, you should be able to start this app with `mvn spring-boot:run`. 
4
-
5
-See instructions below if you don't have a Stormpath account.
6
-
7
-## Stormpath Setup
8
-
9
-The [Stormpath Spring Boot Quickstart](https://docs.stormpath.com/java/spring-boot-web/quickstart.html) shows how to create a Stormpath account and download an API key; here’s the abridged version:
10
-
11
-1. Signup for a free Stormpath developer account at https://api.stormpath.com/register.
12
-2. From the Home tab of the Admin Console select Manage API Keys under the Developer Tools heading.
13
-3. Click the Create API Key button to trigger a download of a apiKey-{API_KEY}.properties file.
14
-4. Move the file to `~/.stormpath/apiKey.properties`.
15
-

+ 43
- 51
server/mvnw Vedi File

@@ -54,38 +54,16 @@ case "`uname`" in
54 54
   CYGWIN*) cygwin=true ;;
55 55
   MINGW*) mingw=true;;
56 56
   Darwin*) darwin=true
57
-           #
58
-           # Look for the Apple JDKs first to preserve the existing behaviour, and then look
59
-           # for the new JDKs provided by Oracle.
60
-           #
61
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
62
-             #
63
-             # Apple JDKs
64
-             #
65
-             export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
66
-           fi
67
-
68
-           if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
69
-             #
70
-             # Apple JDKs
71
-             #
72
-             export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
73
-           fi
74
-
75
-           if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
76
-             #
77
-             # Oracle JDKs
78
-             #
79
-             export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
80
-           fi
81
-
82
-           if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
83
-             #
84
-             # Apple JDKs
85
-             #
86
-             export JAVA_HOME=`/usr/libexec/java_home`
87
-           fi
88
-           ;;
57
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59
+    if [ -z "$JAVA_HOME" ]; then
60
+      if [ -x "/usr/libexec/java_home" ]; then
61
+        export JAVA_HOME="`/usr/libexec/java_home`"
62
+      else
63
+        export JAVA_HOME="/Library/Java/Home"
64
+      fi
65
+    fi
66
+    ;;
89 67
 esac
90 68
 
91 69
 if [ -z "$JAVA_HOME" ] ; then
@@ -184,27 +162,28 @@ fi
184 162
 
185 163
 CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
186 164
 
187
-# For Cygwin, switch paths to Windows format before running java
188
-if $cygwin; then
189
-  [ -n "$M2_HOME" ] &&
190
-    M2_HOME=`cygpath --path --windows "$M2_HOME"`
191
-  [ -n "$JAVA_HOME" ] &&
192
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
193
-  [ -n "$CLASSPATH" ] &&
194
-    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
195
-fi
196
-
197 165
 # traverses directory structure from process work directory to filesystem root
198 166
 # first directory with .mvn subdirectory is considered project base directory
199 167
 find_maven_basedir() {
200
-  local basedir=$(pwd)
201
-  local wdir=$(pwd)
168
+
169
+  if [ -z "$1" ]
170
+  then
171
+    echo "Path not specified to find_maven_basedir"
172
+    return 1
173
+  fi
174
+
175
+  basedir="$1"
176
+  wdir="$1"
202 177
   while [ "$wdir" != '/' ] ; do
203 178
     if [ -d "$wdir"/.mvn ] ; then
204 179
       basedir=$wdir
205 180
       break
206 181
     fi
207
-    wdir=$(cd "$wdir/.."; pwd)
182
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
183
+    if [ -d "${wdir}" ]; then
184
+      wdir=`cd "$wdir/.."; pwd`
185
+    fi
186
+    # end of workaround
208 187
   done
209 188
   echo "${basedir}"
210 189
 }
@@ -216,13 +195,26 @@ concat_lines() {
216 195
   fi
217 196
 }
218 197
 
219
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
198
+BASE_DIR=`find_maven_basedir "$(pwd)"`
199
+if [ -z "$BASE_DIR" ]; then
200
+  exit 1;
201
+fi
202
+
203
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
204
+echo $MAVEN_PROJECTBASEDIR
220 205
 MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
221 206
 
222
-# Provide a "standardized" way to retrieve the CLI args that will
223
-# work with both Windows and non-Windows executions.
224
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
225
-export MAVEN_CMD_LINE_ARGS
207
+# For Cygwin, switch paths to Windows format before running java
208
+if $cygwin; then
209
+  [ -n "$M2_HOME" ] &&
210
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
211
+  [ -n "$JAVA_HOME" ] &&
212
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
213
+  [ -n "$CLASSPATH" ] &&
214
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
215
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
216
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
217
+fi
226 218
 
227 219
 WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
228 220
 
@@ -230,4 +222,4 @@ exec "$JAVACMD" \
230 222
   $MAVEN_OPTS \
231 223
   -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
232 224
   "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
233
-  ${WRAPPER_LAUNCHER} "$@"
225
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 3
- 5
server/mvnw.cmd Vedi File

@@ -80,8 +80,6 @@ goto error
80 80
 
81 81
 :init
82 82
 
83
-set MAVEN_CMD_LINE_ARGS=%*
84
-
85 83
 @REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86 84
 @REM Fallback to current working directory if not found.
87 85
 
@@ -118,10 +116,10 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
118 116
 
119 117
 SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120 118
 
121
-set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
119
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
122 120
 set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
123 121
 
124
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
122
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
125 123
 if ERRORLEVEL 1 goto error
126 124
 goto end
127 125
 
@@ -142,4 +140,4 @@ if "%MAVEN_BATCH_PAUSE%" == "on" pause
142 140
 
143 141
 if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
144 142
 
145
-exit /B %ERROR_CODE%
143
+exit /B %ERROR_CODE%

+ 2
- 3
server/pom.xml Vedi File

@@ -14,7 +14,7 @@
14 14
     <parent>
15 15
         <groupId>org.springframework.boot</groupId>
16 16
         <artifactId>spring-boot-starter-parent</artifactId>
17
-        <version>1.5.3.RELEASE</version>
17
+        <version>1.5.10.RELEASE</version>
18 18
         <relativePath/> <!-- lookup parent from repository -->
19 19
     </parent>
20 20
 
@@ -37,6 +37,7 @@
37 37
             <groupId>org.springframework.boot</groupId>
38 38
             <artifactId>spring-boot-starter-web</artifactId>
39 39
         </dependency>
40
+
40 41
         <dependency>
41 42
             <groupId>org.springframework.boot</groupId>
42 43
             <artifactId>spring-boot-devtools</artifactId>
@@ -55,7 +56,6 @@
55 56
     </dependencies>
56 57
 
57 58
     <build>
58
-        <defaultGoal>spring-boot:run</defaultGoal>
59 59
         <plugins>
60 60
             <plugin>
61 61
                 <groupId>org.springframework.boot</groupId>
@@ -63,5 +63,4 @@
63 63
             </plugin>
64 64
         </plugins>
65 65
     </build>
66
-
67 66
 </project>

+ 0
- 29
server/src/main/java/com/example/DemoApplication.java Vedi File

@@ -1,29 +0,0 @@
1
-package com.example;
2
-
3
-import org.springframework.boot.CommandLineRunner;
4
-import org.springframework.boot.SpringApplication;
5
-import org.springframework.boot.autoconfigure.SpringBootApplication;
6
-import org.springframework.data.jpa.repository.JpaRepository;
7
-import org.springframework.data.rest.core.annotation.RepositoryRestResource;
8
-import org.springframework.stereotype.Component;
9
-import org.springframework.web.bind.annotation.GetMapping;
10
-import org.springframework.web.bind.annotation.RestController;
11
-
12
-import javax.persistence.Entity;
13
-import javax.persistence.GeneratedValue;
14
-import javax.persistence.Id;
15
-import java.util.Collection;
16
-import java.util.HashMap;
17
-import java.util.Map;
18
-import java.util.stream.Collectors;
19
-import java.util.stream.Stream;
20
-
21
-@SpringBootApplication
22
-public class DemoApplication {
23
-
24
-    public static void main(String[] args) {
25
-        SpringApplication.run(DemoApplication.class, args);
26
-    }
27
-}
28
-
29
-

+ 12
- 0
server/src/main/java/com/example/demo/DemoApplication.java Vedi File

@@ -0,0 +1,12 @@
1
+package com.example.demo;
2
+
3
+import org.springframework.boot.SpringApplication;
4
+import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+
6
+@SpringBootApplication
7
+public class DemoApplication {
8
+
9
+    public static void main(String[] args) {
10
+        SpringApplication.run(DemoApplication.class, args);
11
+    }
12
+}

server/src/main/java/com/example/beer/Beer.java → server/src/main/java/com/example/demo/beer/Beer.java Vedi File

@@ -1,4 +1,4 @@
1
-package com.example.beer;
1
+package com.example.demo.beer;
2 2
 
3 3
 import javax.persistence.Entity;
4 4
 import javax.persistence.GeneratedValue;
@@ -42,4 +42,4 @@ public class Beer {
42 42
                 ", name='" + name + '\'' +
43 43
                 '}';
44 44
     }
45
-}
45
+}

server/src/main/java/com/example/beer/BeerCommandLineRunner.java → server/src/main/java/com/example/demo/beer/BeerCommandLineRunner.java Vedi File

@@ -1,4 +1,4 @@
1
-package com.example.beer;
1
+package com.example.demo.beer;
2 2
 
3 3
 import org.springframework.boot.CommandLineRunner;
4 4
 import org.springframework.stereotype.Component;
@@ -6,7 +6,8 @@ import org.springframework.stereotype.Component;
6 6
 import java.util.stream.Stream;
7 7
 
8 8
 @Component
9
-class BeerCommandLineRunner implements CommandLineRunner {
9
+public class BeerCommandLineRunner implements CommandLineRunner {
10
+
10 11
     private final BeerRepository repository;
11 12
 
12 13
     public BeerCommandLineRunner(BeerRepository repository) {
@@ -22,4 +23,4 @@ class BeerCommandLineRunner implements CommandLineRunner {
22 23
         );
23 24
         repository.findAll().forEach(System.out::println);
24 25
     }
25
-}
26
+}

server/src/main/java/com/example/beer/BeerController.java → server/src/main/java/com/example/demo/beer/BeerController.java Vedi File

@@ -1,4 +1,4 @@
1
-package com.example.beer;
1
+package com.example.demo.beer;
2 2
 
3 3
 import org.springframework.web.bind.annotation.CrossOrigin;
4 4
 import org.springframework.web.bind.annotation.GetMapping;
@@ -16,7 +16,7 @@ public class BeerController {
16 16
     }
17 17
 
18 18
     @GetMapping("/good-beers")
19
-    @CrossOrigin(origins = {"http://localhost:8100","file://"})
19
+    @CrossOrigin(origins = {"http://localhost:8100","http://localhost:8080"})
20 20
     public Collection<Beer> goodBeers() {
21 21
 
22 22
         return repository.findAll().stream()
@@ -29,4 +29,4 @@ public class BeerController {
29 29
                 !beer.getName().equals("Coors Light") &&
30 30
                 !beer.getName().equals("PBR");
31 31
     }
32
-}
32
+}

server/src/main/java/com/example/beer/BeerRepository.java → server/src/main/java/com/example/demo/beer/BeerRepository.java Vedi File

@@ -1,10 +1,10 @@
1
-package com.example.beer;
1
+package com.example.demo.beer;
2 2
 
3 3
 import org.springframework.data.jpa.repository.JpaRepository;
4 4
 import org.springframework.data.rest.core.annotation.RepositoryRestResource;
5 5
 import org.springframework.web.bind.annotation.CrossOrigin;
6 6
 
7 7
 @RepositoryRestResource
8
-@CrossOrigin(origins = {"http://localhost:8100","file://"})
8
+@CrossOrigin(origins = {"http://localhost:8100","http://localhost:8080"})
9 9
 interface BeerRepository extends JpaRepository<Beer, Long> {
10
-}
10
+}

server/src/test/java/com/example/DemoApplicationTests.java → server/src/test/java/com/example/demo/DemoApplicationTests.java Vedi File

@@ -1,4 +1,4 @@
1
-package com.example;
1
+package com.example.demo;
2 2
 
3 3
 import org.junit.Test;
4 4
 import org.junit.runner.RunWith;

BIN
static/android-beer-list.png Vedi File


BIN
static/beer-delete.png Vedi File


BIN
static/beer-modal.png Vedi File


BIN
static/good-beers-json.png Vedi File


BIN
static/good-beers-ui.png Vedi File


BIN
static/ionic-labs.png Vedi File


BIN
static/ionic-tabs.png Vedi File


BIN
static/iphone-beer-list.jpg Vedi File


BIN
static/lighthouse-51.png Vedi File


BIN
static/no-http-provider.png Vedi File