瀏覽代碼

almost done

Jared Norris 8 年之前
父節點
當前提交
7afeb3390f
共有 55 個檔案被更改,包括 366 行新增12197 行删除
  1. 二進制
      .DS_Store
  2. 二進制
      Client/.DS_Store
  3. 15
    0
      Client/pom.xml
  4. 二進制
      Client/src/.DS_Store
  5. 二進制
      Client/src/main/.DS_Store
  6. 135
    0
      Client/src/main/java/SimpleShell.java
  7. 45
    0
      Client/src/main/java/access/YouAreEll.java
  8. 8
    0
      Client/src/main/java/controller/Controller.java
  9. 41
    0
      Client/src/main/java/controller/IdController.java
  10. 57
    0
      Client/src/main/java/controller/MessageController.java
  11. 27
    0
      Client/src/main/java/model/Id.java
  12. 8
    23
      Client/src/main/java/model/Message.java
  13. 0
    12
      client/.babelrc
  14. 0
    9
      client/.editorconfig
  15. 0
    14
      client/.gitignore
  16. 0
    10
      client/.postcssrc.js
  17. 0
    21
      client/README.md
  18. 0
    41
      client/build/build.js
  19. 0
    54
      client/build/check-versions.js
  20. 二進制
      client/build/logo.png
  21. 0
    101
      client/build/utils.js
  22. 0
    22
      client/build/vue-loader.conf.js
  23. 0
    82
      client/build/webpack.base.conf.js
  24. 0
    95
      client/build/webpack.dev.conf.js
  25. 0
    145
      client/build/webpack.prod.conf.js
  26. 0
    7
      client/config/dev.env.js
  27. 0
    69
      client/config/index.js
  28. 0
    4
      client/config/prod.env.js
  29. 0
    12
      client/index.html
  30. 0
    10622
      client/package-lock.json
  31. 0
    62
      client/package.json
  32. 0
    23
      client/src/App.vue
  33. 二進制
      client/src/assets/logo.png
  34. 0
    113
      client/src/components/HelloWorld.vue
  35. 0
    15
      client/src/main.js
  36. 0
    15
      client/src/router/index.js
  37. 0
    0
      client/static/.gitkeep
  38. 0
    225
      mvnw
  39. 0
    143
      mvnw.cmd
  40. 30
    58
      pom.xml
  41. 0
    11
      src/main/java/com/jard/youareell/YouAreEllApplication.java
  42. 0
    5
      src/main/java/com/jard/youareell/access/IdDao.java
  43. 0
    13
      src/main/java/com/jard/youareell/access/IdDaoImpl.java
  44. 0
    5
      src/main/java/com/jard/youareell/access/MessageDao.java
  45. 0
    13
      src/main/java/com/jard/youareell/access/MessageDaoImpl.java
  46. 0
    13
      src/main/java/com/jard/youareell/client/controllers/IdController.java
  47. 0
    13
      src/main/java/com/jard/youareell/client/controllers/MessageController.java
  48. 0
    39
      src/main/java/com/jard/youareell/config/DataConfig.java
  49. 0
    36
      src/main/java/com/jard/youareell/model/Id.java
  50. 0
    5
      src/main/java/com/jard/youareell/service/IdService.java
  51. 0
    13
      src/main/java/com/jard/youareell/service/IdServiceImpl.java
  52. 0
    5
      src/main/java/com/jard/youareell/service/MessageService.java
  53. 0
    13
      src/main/java/com/jard/youareell/service/MessageServiceImpl.java
  54. 0
    0
      src/main/resources/application.properties
  55. 0
    16
      src/test/java/com/jard/youareell/YouAreEllApplicationTests.java

二進制
.DS_Store 查看文件


二進制
Client/.DS_Store 查看文件


+ 15
- 0
Client/pom.xml 查看文件

@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+         xmlns="http://maven.apache.org/POM/4.0.0"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <parent>
6
+        <artifactId>YouAreEll</artifactId>
7
+        <groupId>com.zipcoder.ZipChat</groupId>
8
+        <version>1.0-SNAPSHOT</version>
9
+    </parent>
10
+    <modelVersion>4.0.0</modelVersion>
11
+
12
+    <artifactId>Client</artifactId>
13
+
14
+
15
+</project>

二進制
Client/src/.DS_Store 查看文件


二進制
Client/src/main/.DS_Store 查看文件


+ 135
- 0
Client/src/main/java/SimpleShell.java 查看文件

@@ -0,0 +1,135 @@
1
+import access.YouAreEll;
2
+import controller.IdController;
3
+import controller.MessageController;
4
+
5
+import java.io.BufferedReader;
6
+import java.io.IOException;
7
+import java.io.InputStream;
8
+import java.io.InputStreamReader;
9
+import java.util.ArrayList;
10
+import java.util.List;
11
+import java.util.regex.Matcher;
12
+import java.util.regex.Pattern;
13
+
14
+public class SimpleShell {
15
+    public static void prettyPrint(String output) {
16
+        // yep, make an effort to format things nicely, eh?
17
+        System.out.println(output);
18
+    }
19
+
20
+    //TODO: MY CODE HERE
21
+    public static List<String> listMaker(String input, Pattern p) {
22
+        List<String> result = new ArrayList<>();
23
+        Matcher m = p.matcher(input);
24
+        while (m.find()) {
25
+            result.add(m.group());
26
+        }
27
+        return result;
28
+    }
29
+    //TODO: MY CODE HERE
30
+
31
+    public static void main(String[] args) throws java.io.IOException {
32
+        IdController idController = new IdController();
33
+        MessageController messageController = new MessageController();
34
+        String commandLine;
35
+        BufferedReader console = new BufferedReader
36
+                (new InputStreamReader(System.in));
37
+        ProcessBuilder pb = new ProcessBuilder();
38
+        List<String> history = new ArrayList<String>();
39
+        int index = 0;
40
+        //we break out with <ctrl c>
41
+        while (true) {
42
+            //read what the user enters
43
+            System.out.println("cmd? ");
44
+            commandLine = console.readLine();
45
+
46
+            //TODO: MY CODE HERE
47
+            List<String> list = listMaker(commandLine, Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"));
48
+            //TODO: MY CODE HERE
49
+
50
+            //if the user entered a return, just loop again
51
+            if (commandLine.equals(""))
52
+                continue;
53
+            if (commandLine.equals("exit")) {
54
+                System.out.println("bye!");
55
+                break;
56
+            }
57
+
58
+            System.out.println(list); //***check to see if list was added correctly***
59
+            history.addAll(list);
60
+
61
+            try {
62
+                //display history of shell with index
63
+                if (list.get(list.size() - 1).equals("history")) {
64
+                    for (String s : history)
65
+                        System.out.println((index++) + " " + s);
66
+                    continue;
67
+                }
68
+
69
+                // Specific Commands.
70
+                //TODO: ---------------------------------------------------------
71
+                //TODO: MY CODE STARTS HERE
72
+                // ids
73
+                if (list.contains("ids")) {
74
+                    prettyPrint(idController.route(list));
75
+                    continue;
76
+                }
77
+
78
+                // messages
79
+                if (list.contains("messages") || list.contains("send")) {
80
+                    prettyPrint(messageController.route(list));
81
+                    continue;
82
+                }
83
+                //TODO: MY CODE ENDS HERE
84
+                //TODO: ---------------------------------------------------------
85
+                // you need to add a bunch more.
86
+
87
+                //!! command returns the last command in history
88
+                if (list.get(list.size() - 1).equals("!!")) {
89
+                    pb.command(history.get(history.size() - 2));
90
+
91
+                }//!<integer value i> command
92
+                else if (list.get(list.size() - 1).charAt(0) == '!') {
93
+                    int b = Character.getNumericValue(list.get(list.size() - 1).charAt(1));
94
+                    if (b <= history.size())//check if integer entered isn't bigger than history size
95
+                        pb.command(history.get(b));
96
+                } else {
97
+                    pb.command(list);
98
+                }
99
+
100
+                // wait, wait, what curiousness is this?
101
+                Process process = pb.start();
102
+
103
+                //obtain the input stream
104
+                InputStream is = process.getInputStream();
105
+                InputStreamReader isr = new InputStreamReader(is);
106
+                BufferedReader br = new BufferedReader(isr);
107
+
108
+                //read output of the process
109
+                String line;
110
+                while ((line = br.readLine()) != null)
111
+                    System.out.println(line);
112
+                br.close();
113
+
114
+
115
+            }
116
+
117
+            //catch ioexception, output appropriate message, resume waiting for input
118
+            catch (IOException e) {
119
+                System.out.println("Input Error, Please try again!");
120
+            }
121
+            // So what, do you suppose, is the meaning of this comment?
122
+            /** The steps are:
123
+             * 1. parse the input to obtain the command and any parameters
124
+             * 2. create a ProcessBuilder object
125
+             * 3. start the process
126
+             * 4. obtain the output stream
127
+             * 5. output the contents returned by the command
128
+             */
129
+
130
+        }
131
+
132
+
133
+    }
134
+
135
+}

+ 45
- 0
Client/src/main/java/access/YouAreEll.java 查看文件

@@ -0,0 +1,45 @@
1
+package access;
2
+
3
+import okhttp3.*;
4
+
5
+public class YouAreEll {
6
+    private String serverUrl = "http://zipcode.rocks:8085";
7
+    private static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
8
+    private OkHttpClient ok = new OkHttpClient();
9
+
10
+    public YouAreEll() {
11
+    }
12
+
13
+    public String get_ids() {
14
+        return MakeURLCall("/ids", "GET", "");
15
+    }
16
+    public String post_ids(String jpayload) { return MakeURLCall("/ids", "POST", jpayload); }
17
+    public String put_ids(String jpayload){ return MakeURLCall("/ids", "PUT", jpayload); }
18
+
19
+    public String get_messages(String url) { return MakeURLCall(url, "GET", ""); }
20
+    public String post_messages(String url, String jpayload) { return MakeURLCall(url, "POST", jpayload); }
21
+
22
+    private String MakeURLCall(String mainurl, String method, String jpayload) {
23
+        Request okRequest = null;
24
+        Response talkBack;
25
+        RequestBody okBody = RequestBody.create(JSON, jpayload);
26
+        try {
27
+            switch(method) {
28
+                case "PUT":
29
+                    okRequest = new Request.Builder().url(serverUrl + mainurl).put(okBody).build();
30
+                    break;
31
+                case "POST":
32
+                    okRequest = new Request.Builder().url(serverUrl + mainurl).post(okBody).build();
33
+                    break;
34
+                case "GET":
35
+                    okRequest = new Request.Builder().url(serverUrl + mainurl).build();
36
+            }
37
+            talkBack = ok.newCall(okRequest).execute();
38
+            return talkBack.body().string();
39
+        }
40
+        catch (Exception e) {
41
+            System.out.println(e.getMessage());
42
+        }
43
+        return "";
44
+    }
45
+}

+ 8
- 0
Client/src/main/java/controller/Controller.java 查看文件

@@ -0,0 +1,8 @@
1
+package controller;
2
+
3
+import java.io.IOException;
4
+import java.util.List;
5
+
6
+public interface Controller {
7
+    public String route(List<String> commands) throws IOException;
8
+}

+ 41
- 0
Client/src/main/java/controller/IdController.java 查看文件

@@ -0,0 +1,41 @@
1
+package controller;
2
+
3
+import access.YouAreEll;
4
+import com.fasterxml.jackson.databind.ObjectMapper;
5
+import model.Id;
6
+
7
+import java.io.IOException;
8
+import java.util.List;
9
+
10
+public class IdController implements Controller {
11
+    private YouAreEll access = new YouAreEll();
12
+    private ObjectMapper om = new ObjectMapper();
13
+    private List<String> commands;
14
+    private Id id;
15
+    //--------------------------------------------------------------------------------------
16
+    //master routing
17
+    @Override
18
+    public String route(List<String> commands) throws IOException {
19
+        this.commands = commands;
20
+
21
+        if (commands.size() == 1) return listAll();
22
+        else return postId();
23
+    }
24
+    //--------------------------------------------------------------------------------------
25
+    //access methods
26
+    private String listAll() {
27
+        return access.get_ids();
28
+    }
29
+    private String postId() throws IOException {
30
+        String names = listAll();
31
+        id = new Id(commands.get(1), commands.get(2));
32
+        String regex = id.getName();
33
+
34
+        if (names.contains(regex)) return access.post_ids(om.writeValueAsString(id));
35
+        else return updateName();
36
+    }
37
+    private String updateName() throws IOException {
38
+        id.setName(commands.get(1));
39
+        return access.put_ids(om.writeValueAsString(id));
40
+    }
41
+}

+ 57
- 0
Client/src/main/java/controller/MessageController.java 查看文件

@@ -0,0 +1,57 @@
1
+package controller;
2
+
3
+import access.YouAreEll;
4
+import com.fasterxml.jackson.databind.ObjectMapper;
5
+import model.Message;
6
+
7
+import java.io.IOException;
8
+import java.util.List;
9
+
10
+public class MessageController implements Controller {
11
+    private YouAreEll access = new YouAreEll();
12
+    private ObjectMapper om = new ObjectMapper();
13
+    private List<String> commands;
14
+    private Message message;
15
+    //--------------------------------------------------------------------------------------
16
+    //master routing
17
+    @Override
18
+    public String route(List<String> commands) throws IOException {
19
+        this.commands = commands;
20
+        switch(commands.get(0)) {
21
+            case "send":
22
+                return routeSendMessages();
23
+            case "messages":
24
+                return routeGetMessages();
25
+            default: return "";
26
+        }
27
+    }
28
+    //--------------------------------------------------------------------------------------
29
+    //sub routing
30
+    private String routeGetMessages() throws IOException {
31
+        switch(commands.size()) {
32
+            case 1:
33
+                return listLastTwenty("");
34
+            case 2:
35
+                return listLastTwenty("/ids/" + commands.get(1));
36
+        }
37
+        return "";
38
+    }
39
+    private String routeSendMessages() throws IOException {
40
+        switch(commands.size()) {
41
+            case 3:
42
+                message = new Message(commands.get(1), commands.get(2), "");
43
+                break;
44
+            case 5:
45
+                message = new Message(commands.get(1), commands.get(2), commands.get(4));
46
+        }
47
+        return sendMessage("/ids/" + message.getFromid() + "/messages");
48
+    }
49
+    //--------------------------------------------------------------------------------------
50
+    //access methods
51
+    private String listLastTwenty(String name) throws IOException {
52
+        return access.get_messages(name + "/messages");
53
+    }
54
+    private String sendMessage(String target) throws IOException {
55
+        return access.post_messages(target, om.writeValueAsString(message));
56
+    }
57
+}

+ 27
- 0
Client/src/main/java/model/Id.java 查看文件

@@ -0,0 +1,27 @@
1
+package model;
2
+
3
+public class Id {
4
+    private String name;
5
+    private String github;
6
+
7
+    public Id() { }
8
+
9
+    public Id(String name, String github) {
10
+        this.name = name;
11
+        this.github = github;
12
+    }
13
+
14
+    public String getName() {
15
+        return name;
16
+    }
17
+
18
+    public String getGithub() { return github; }
19
+
20
+    public void setName(String name) {
21
+        this.name = name;
22
+    }
23
+
24
+    public void setGithub(String github) {
25
+        this.github = github;
26
+    }
27
+}

src/main/java/com/jard/youareell/model/Message.java → Client/src/main/java/model/Message.java 查看文件

@@ -1,31 +1,16 @@
1
-package com.jard.youareell.model;
1
+package model;
2 2
 
3
-import javax.persistence.Entity;
4
-
5
-@Entity
6 3
 public class Message {
7
-    //TODO: Have some validation in here
8
-
9
-    private String sequence;
10
-    private String timestamp;
4
+    private String sequence = "_";
5
+    private String timestamp = "_";
11 6
     private String fromid;
12
-    private String toid;
13 7
     private String message;
8
+    private String toid;
14 9
 
15
-    public String getSequence() {
16
-        return sequence;
17
-    }
18
-
19
-    public void setSequence(String sequence) {
20
-        this.sequence = sequence;
21
-    }
22
-
23
-    public String getTimestamp() {
24
-        return timestamp;
25
-    }
26
-
27
-    public void setTimestamp(String timestamp) {
28
-        this.timestamp = timestamp;
10
+    public Message(String fromid, String message, String toid) {
11
+        this.fromid = fromid;
12
+        this.message = message;
13
+        this.toid = toid;
29 14
     }
30 15
 
31 16
     public String getFromid() {

+ 0
- 12
client/.babelrc 查看文件

@@ -1,12 +0,0 @@
1
-{
2
-  "presets": [
3
-    ["env", {
4
-      "modules": false,
5
-      "targets": {
6
-        "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7
-      }
8
-    }],
9
-    "stage-2"
10
-  ],
11
-  "plugins": ["transform-vue-jsx", "transform-runtime"]
12
-}

+ 0
- 9
client/.editorconfig 查看文件

@@ -1,9 +0,0 @@
1
-root = true
2
-
3
-[*]
4
-charset = utf-8
5
-indent_style = space
6
-indent_size = 2
7
-end_of_line = lf
8
-insert_final_newline = true
9
-trim_trailing_whitespace = true

+ 0
- 14
client/.gitignore 查看文件

@@ -1,14 +0,0 @@
1
-.DS_Store
2
-node_modules/
3
-/dist/
4
-npm-debug.log*
5
-yarn-debug.log*
6
-yarn-error.log*
7
-
8
-# Editor directories and files
9
-.idea
10
-.vscode
11
-*.suo
12
-*.ntvs*
13
-*.njsproj
14
-*.sln

+ 0
- 10
client/.postcssrc.js 查看文件

@@ -1,10 +0,0 @@
1
-// https://github.com/michael-ciniawsky/postcss-load-config
2
-
3
-module.exports = {
4
-  "plugins": {
5
-    "postcss-import": {},
6
-    "postcss-url": {},
7
-    // to edit target browsers: use "browserslist" field in package.json
8
-    "autoprefixer": {}
9
-  }
10
-}

+ 0
- 21
client/README.md 查看文件

@@ -1,21 +0,0 @@
1
-# client
2
-
3
-> A Vue.js project
4
-
5
-## Build Setup
6
-
7
-``` bash
8
-# install dependencies
9
-npm install
10
-
11
-# serve with hot reload at localhost:8080
12
-npm run dev
13
-
14
-# build for production with minification
15
-npm run build
16
-
17
-# build for production and view the bundle analyzer report
18
-npm run build --report
19
-```
20
-
21
-For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

+ 0
- 41
client/build/build.js 查看文件

@@ -1,41 +0,0 @@
1
-'use strict'
2
-require('./check-versions')()
3
-
4
-process.env.NODE_ENV = 'production'
5
-
6
-const ora = require('ora')
7
-const rm = require('rimraf')
8
-const path = require('path')
9
-const chalk = require('chalk')
10
-const webpack = require('webpack')
11
-const config = require('../config')
12
-const webpackConfig = require('./webpack.prod.conf')
13
-
14
-const spinner = ora('building for production...')
15
-spinner.start()
16
-
17
-rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18
-  if (err) throw err
19
-  webpack(webpackConfig, (err, stats) => {
20
-    spinner.stop()
21
-    if (err) throw err
22
-    process.stdout.write(stats.toString({
23
-      colors: true,
24
-      modules: false,
25
-      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26
-      chunks: false,
27
-      chunkModules: false
28
-    }) + '\n\n')
29
-
30
-    if (stats.hasErrors()) {
31
-      console.log(chalk.red('  Build failed with errors.\n'))
32
-      process.exit(1)
33
-    }
34
-
35
-    console.log(chalk.cyan('  Build complete.\n'))
36
-    console.log(chalk.yellow(
37
-      '  Tip: built files are meant to be served over an HTTP server.\n' +
38
-      '  Opening index.html over file:// won\'t work.\n'
39
-    ))
40
-  })
41
-})

+ 0
- 54
client/build/check-versions.js 查看文件

@@ -1,54 +0,0 @@
1
-'use strict'
2
-const chalk = require('chalk')
3
-const semver = require('semver')
4
-const packageConfig = require('../package.json')
5
-const shell = require('shelljs')
6
-
7
-function exec (cmd) {
8
-  return require('child_process').execSync(cmd).toString().trim()
9
-}
10
-
11
-const versionRequirements = [
12
-  {
13
-    name: 'node',
14
-    currentVersion: semver.clean(process.version),
15
-    versionRequirement: packageConfig.engines.node
16
-  }
17
-]
18
-
19
-if (shell.which('npm')) {
20
-  versionRequirements.push({
21
-    name: 'npm',
22
-    currentVersion: exec('npm --version'),
23
-    versionRequirement: packageConfig.engines.npm
24
-  })
25
-}
26
-
27
-module.exports = function () {
28
-  const warnings = []
29
-
30
-  for (let i = 0; i < versionRequirements.length; i++) {
31
-    const mod = versionRequirements[i]
32
-
33
-    if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34
-      warnings.push(mod.name + ': ' +
35
-        chalk.red(mod.currentVersion) + ' should be ' +
36
-        chalk.green(mod.versionRequirement)
37
-      )
38
-    }
39
-  }
40
-
41
-  if (warnings.length) {
42
-    console.log('')
43
-    console.log(chalk.yellow('To use this template, you must update following to modules:'))
44
-    console.log()
45
-
46
-    for (let i = 0; i < warnings.length; i++) {
47
-      const warning = warnings[i]
48
-      console.log('  ' + warning)
49
-    }
50
-
51
-    console.log()
52
-    process.exit(1)
53
-  }
54
-}

二進制
client/build/logo.png 查看文件


+ 0
- 101
client/build/utils.js 查看文件

@@ -1,101 +0,0 @@
1
-'use strict'
2
-const path = require('path')
3
-const config = require('../config')
4
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
5
-const packageConfig = require('../package.json')
6
-
7
-exports.assetsPath = function (_path) {
8
-  const assetsSubDirectory = process.env.NODE_ENV === 'production'
9
-    ? config.build.assetsSubDirectory
10
-    : config.dev.assetsSubDirectory
11
-
12
-  return path.posix.join(assetsSubDirectory, _path)
13
-}
14
-
15
-exports.cssLoaders = function (options) {
16
-  options = options || {}
17
-
18
-  const cssLoader = {
19
-    loader: 'css-loader',
20
-    options: {
21
-      sourceMap: options.sourceMap
22
-    }
23
-  }
24
-
25
-  const postcssLoader = {
26
-    loader: 'postcss-loader',
27
-    options: {
28
-      sourceMap: options.sourceMap
29
-    }
30
-  }
31
-
32
-  // generate loader string to be used with extract text plugin
33
-  function generateLoaders (loader, loaderOptions) {
34
-    const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
35
-
36
-    if (loader) {
37
-      loaders.push({
38
-        loader: loader + '-loader',
39
-        options: Object.assign({}, loaderOptions, {
40
-          sourceMap: options.sourceMap
41
-        })
42
-      })
43
-    }
44
-
45
-    // Extract CSS when that option is specified
46
-    // (which is the case during production build)
47
-    if (options.extract) {
48
-      return ExtractTextPlugin.extract({
49
-        use: loaders,
50
-        fallback: 'vue-style-loader'
51
-      })
52
-    } else {
53
-      return ['vue-style-loader'].concat(loaders)
54
-    }
55
-  }
56
-
57
-  // https://vue-loader.vuejs.org/en/configurations/extract-css.html
58
-  return {
59
-    css: generateLoaders(),
60
-    postcss: generateLoaders(),
61
-    less: generateLoaders('less'),
62
-    sass: generateLoaders('sass', { indentedSyntax: true }),
63
-    scss: generateLoaders('sass'),
64
-    stylus: generateLoaders('stylus'),
65
-    styl: generateLoaders('stylus')
66
-  }
67
-}
68
-
69
-// Generate loaders for standalone style files (outside of .vue)
70
-exports.styleLoaders = function (options) {
71
-  const output = []
72
-  const loaders = exports.cssLoaders(options)
73
-
74
-  for (const extension in loaders) {
75
-    const loader = loaders[extension]
76
-    output.push({
77
-      test: new RegExp('\\.' + extension + '$'),
78
-      use: loader
79
-    })
80
-  }
81
-
82
-  return output
83
-}
84
-
85
-exports.createNotifierCallback = () => {
86
-  const notifier = require('node-notifier')
87
-
88
-  return (severity, errors) => {
89
-    if (severity !== 'error') return
90
-
91
-    const error = errors[0]
92
-    const filename = error.file && error.file.split('!').pop()
93
-
94
-    notifier.notify({
95
-      title: packageConfig.name,
96
-      message: severity + ': ' + error.name,
97
-      subtitle: filename || '',
98
-      icon: path.join(__dirname, 'logo.png')
99
-    })
100
-  }
101
-}

+ 0
- 22
client/build/vue-loader.conf.js 查看文件

@@ -1,22 +0,0 @@
1
-'use strict'
2
-const utils = require('./utils')
3
-const config = require('../config')
4
-const isProduction = process.env.NODE_ENV === 'production'
5
-const sourceMapEnabled = isProduction
6
-  ? config.build.productionSourceMap
7
-  : config.dev.cssSourceMap
8
-
9
-module.exports = {
10
-  loaders: utils.cssLoaders({
11
-    sourceMap: sourceMapEnabled,
12
-    extract: isProduction
13
-  }),
14
-  cssSourceMap: sourceMapEnabled,
15
-  cacheBusting: config.dev.cacheBusting,
16
-  transformToRequire: {
17
-    video: ['src', 'poster'],
18
-    source: 'src',
19
-    img: 'src',
20
-    image: 'xlink:href'
21
-  }
22
-}

+ 0
- 82
client/build/webpack.base.conf.js 查看文件

@@ -1,82 +0,0 @@
1
-'use strict'
2
-const path = require('path')
3
-const utils = require('./utils')
4
-const config = require('../config')
5
-const vueLoaderConfig = require('./vue-loader.conf')
6
-
7
-function resolve (dir) {
8
-  return path.join(__dirname, '..', dir)
9
-}
10
-
11
-
12
-
13
-module.exports = {
14
-  context: path.resolve(__dirname, '../'),
15
-  entry: {
16
-    app: './src/main.js'
17
-  },
18
-  output: {
19
-    path: config.build.assetsRoot,
20
-    filename: '[name].js',
21
-    publicPath: process.env.NODE_ENV === 'production'
22
-      ? config.build.assetsPublicPath
23
-      : config.dev.assetsPublicPath
24
-  },
25
-  resolve: {
26
-    extensions: ['.js', '.vue', '.json'],
27
-    alias: {
28
-      'vue$': 'vue/dist/vue.esm.js',
29
-      '@': resolve('src'),
30
-    }
31
-  },
32
-  module: {
33
-    rules: [
34
-      {
35
-        test: /\.vue$/,
36
-        loader: 'vue-loader',
37
-        options: vueLoaderConfig
38
-      },
39
-      {
40
-        test: /\.js$/,
41
-        loader: 'babel-loader',
42
-        include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
43
-      },
44
-      {
45
-        test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
46
-        loader: 'url-loader',
47
-        options: {
48
-          limit: 10000,
49
-          name: utils.assetsPath('img/[name].[hash:7].[ext]')
50
-        }
51
-      },
52
-      {
53
-        test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
54
-        loader: 'url-loader',
55
-        options: {
56
-          limit: 10000,
57
-          name: utils.assetsPath('media/[name].[hash:7].[ext]')
58
-        }
59
-      },
60
-      {
61
-        test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
62
-        loader: 'url-loader',
63
-        options: {
64
-          limit: 10000,
65
-          name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
66
-        }
67
-      }
68
-    ]
69
-  },
70
-  node: {
71
-    // prevent webpack from injecting useless setImmediate polyfill because Vue
72
-    // source contains it (although only uses it if it's native).
73
-    setImmediate: false,
74
-    // prevent webpack from injecting mocks to Node native modules
75
-    // that does not make sense for the client
76
-    dgram: 'empty',
77
-    fs: 'empty',
78
-    net: 'empty',
79
-    tls: 'empty',
80
-    child_process: 'empty'
81
-  }
82
-}

+ 0
- 95
client/build/webpack.dev.conf.js 查看文件

@@ -1,95 +0,0 @@
1
-'use strict'
2
-const utils = require('./utils')
3
-const webpack = require('webpack')
4
-const config = require('../config')
5
-const merge = require('webpack-merge')
6
-const path = require('path')
7
-const baseWebpackConfig = require('./webpack.base.conf')
8
-const CopyWebpackPlugin = require('copy-webpack-plugin')
9
-const HtmlWebpackPlugin = require('html-webpack-plugin')
10
-const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
11
-const portfinder = require('portfinder')
12
-
13
-const HOST = process.env.HOST
14
-const PORT = process.env.PORT && Number(process.env.PORT)
15
-
16
-const devWebpackConfig = merge(baseWebpackConfig, {
17
-  module: {
18
-    rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
19
-  },
20
-  // cheap-module-eval-source-map is faster for development
21
-  devtool: config.dev.devtool,
22
-
23
-  // these devServer options should be customized in /config/index.js
24
-  devServer: {
25
-    clientLogLevel: 'warning',
26
-    historyApiFallback: {
27
-      rewrites: [
28
-        { from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
29
-      ],
30
-    },
31
-    hot: true,
32
-    contentBase: false, // since we use CopyWebpackPlugin.
33
-    compress: true,
34
-    host: HOST || config.dev.host,
35
-    port: PORT || config.dev.port,
36
-    open: config.dev.autoOpenBrowser,
37
-    overlay: config.dev.errorOverlay
38
-      ? { warnings: false, errors: true }
39
-      : false,
40
-    publicPath: config.dev.assetsPublicPath,
41
-    proxy: config.dev.proxyTable,
42
-    quiet: true, // necessary for FriendlyErrorsPlugin
43
-    watchOptions: {
44
-      poll: config.dev.poll,
45
-    }
46
-  },
47
-  plugins: [
48
-    new webpack.DefinePlugin({
49
-      'process.env': require('../config/dev.env')
50
-    }),
51
-    new webpack.HotModuleReplacementPlugin(),
52
-    new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
53
-    new webpack.NoEmitOnErrorsPlugin(),
54
-    // https://github.com/ampedandwired/html-webpack-plugin
55
-    new HtmlWebpackPlugin({
56
-      filename: 'index.html',
57
-      template: 'index.html',
58
-      inject: true
59
-    }),
60
-    // copy custom static assets
61
-    new CopyWebpackPlugin([
62
-      {
63
-        from: path.resolve(__dirname, '../static'),
64
-        to: config.dev.assetsSubDirectory,
65
-        ignore: ['.*']
66
-      }
67
-    ])
68
-  ]
69
-})
70
-
71
-module.exports = new Promise((resolve, reject) => {
72
-  portfinder.basePort = process.env.PORT || config.dev.port
73
-  portfinder.getPort((err, port) => {
74
-    if (err) {
75
-      reject(err)
76
-    } else {
77
-      // publish the new Port, necessary for e2e tests
78
-      process.env.PORT = port
79
-      // add port to devServer config
80
-      devWebpackConfig.devServer.port = port
81
-
82
-      // Add FriendlyErrorsPlugin
83
-      devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
84
-        compilationSuccessInfo: {
85
-          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
86
-        },
87
-        onErrors: config.dev.notifyOnErrors
88
-        ? utils.createNotifierCallback()
89
-        : undefined
90
-      }))
91
-
92
-      resolve(devWebpackConfig)
93
-    }
94
-  })
95
-})

+ 0
- 145
client/build/webpack.prod.conf.js 查看文件

@@ -1,145 +0,0 @@
1
-'use strict'
2
-const path = require('path')
3
-const utils = require('./utils')
4
-const webpack = require('webpack')
5
-const config = require('../config')
6
-const merge = require('webpack-merge')
7
-const baseWebpackConfig = require('./webpack.base.conf')
8
-const CopyWebpackPlugin = require('copy-webpack-plugin')
9
-const HtmlWebpackPlugin = require('html-webpack-plugin')
10
-const ExtractTextPlugin = require('extract-text-webpack-plugin')
11
-const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13
-
14
-const env = require('../config/prod.env')
15
-
16
-const webpackConfig = merge(baseWebpackConfig, {
17
-  module: {
18
-    rules: utils.styleLoaders({
19
-      sourceMap: config.build.productionSourceMap,
20
-      extract: true,
21
-      usePostCSS: true
22
-    })
23
-  },
24
-  devtool: config.build.productionSourceMap ? config.build.devtool : false,
25
-  output: {
26
-    path: config.build.assetsRoot,
27
-    filename: utils.assetsPath('js/[name].[chunkhash].js'),
28
-    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29
-  },
30
-  plugins: [
31
-    // http://vuejs.github.io/vue-loader/en/workflow/production.html
32
-    new webpack.DefinePlugin({
33
-      'process.env': env
34
-    }),
35
-    new UglifyJsPlugin({
36
-      uglifyOptions: {
37
-        compress: {
38
-          warnings: false
39
-        }
40
-      },
41
-      sourceMap: config.build.productionSourceMap,
42
-      parallel: true
43
-    }),
44
-    // extract css into its own file
45
-    new ExtractTextPlugin({
46
-      filename: utils.assetsPath('css/[name].[contenthash].css'),
47
-      // Setting the following option to `false` will not extract CSS from codesplit chunks.
48
-      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
49
-      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`, 
50
-      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
51
-      allChunks: true,
52
-    }),
53
-    // Compress extracted CSS. We are using this plugin so that possible
54
-    // duplicated CSS from different components can be deduped.
55
-    new OptimizeCSSPlugin({
56
-      cssProcessorOptions: config.build.productionSourceMap
57
-        ? { safe: true, map: { inline: false } }
58
-        : { safe: true }
59
-    }),
60
-    // generate dist index.html with correct asset hash for caching.
61
-    // you can customize output by editing /index.html
62
-    // see https://github.com/ampedandwired/html-webpack-plugin
63
-    new HtmlWebpackPlugin({
64
-      filename: config.build.index,
65
-      template: 'index.html',
66
-      inject: true,
67
-      minify: {
68
-        removeComments: true,
69
-        collapseWhitespace: true,
70
-        removeAttributeQuotes: true
71
-        // more options:
72
-        // https://github.com/kangax/html-minifier#options-quick-reference
73
-      },
74
-      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
75
-      chunksSortMode: 'dependency'
76
-    }),
77
-    // keep module.id stable when vendor modules does not change
78
-    new webpack.HashedModuleIdsPlugin(),
79
-    // enable scope hoisting
80
-    new webpack.optimize.ModuleConcatenationPlugin(),
81
-    // split vendor js into its own file
82
-    new webpack.optimize.CommonsChunkPlugin({
83
-      name: 'vendor',
84
-      minChunks (module) {
85
-        // any required modules inside node_modules are extracted to vendor
86
-        return (
87
-          module.resource &&
88
-          /\.js$/.test(module.resource) &&
89
-          module.resource.indexOf(
90
-            path.join(__dirname, '../node_modules')
91
-          ) === 0
92
-        )
93
-      }
94
-    }),
95
-    // extract webpack runtime and module manifest to its own file in order to
96
-    // prevent vendor hash from being updated whenever app bundle is updated
97
-    new webpack.optimize.CommonsChunkPlugin({
98
-      name: 'manifest',
99
-      minChunks: Infinity
100
-    }),
101
-    // This instance extracts shared chunks from code splitted chunks and bundles them
102
-    // in a separate chunk, similar to the vendor chunk
103
-    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
104
-    new webpack.optimize.CommonsChunkPlugin({
105
-      name: 'app',
106
-      async: 'vendor-async',
107
-      children: true,
108
-      minChunks: 3
109
-    }),
110
-
111
-    // copy custom static assets
112
-    new CopyWebpackPlugin([
113
-      {
114
-        from: path.resolve(__dirname, '../static'),
115
-        to: config.build.assetsSubDirectory,
116
-        ignore: ['.*']
117
-      }
118
-    ])
119
-  ]
120
-})
121
-
122
-if (config.build.productionGzip) {
123
-  const CompressionWebpackPlugin = require('compression-webpack-plugin')
124
-
125
-  webpackConfig.plugins.push(
126
-    new CompressionWebpackPlugin({
127
-      asset: '[path].gz[query]',
128
-      algorithm: 'gzip',
129
-      test: new RegExp(
130
-        '\\.(' +
131
-        config.build.productionGzipExtensions.join('|') +
132
-        ')$'
133
-      ),
134
-      threshold: 10240,
135
-      minRatio: 0.8
136
-    })
137
-  )
138
-}
139
-
140
-if (config.build.bundleAnalyzerReport) {
141
-  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
142
-  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
143
-}
144
-
145
-module.exports = webpackConfig

+ 0
- 7
client/config/dev.env.js 查看文件

@@ -1,7 +0,0 @@
1
-'use strict'
2
-const merge = require('webpack-merge')
3
-const prodEnv = require('./prod.env')
4
-
5
-module.exports = merge(prodEnv, {
6
-  NODE_ENV: '"development"'
7
-})

+ 0
- 69
client/config/index.js 查看文件

@@ -1,69 +0,0 @@
1
-'use strict'
2
-// Template version: 1.3.1
3
-// see http://vuejs-templates.github.io/webpack for documentation.
4
-
5
-const path = require('path')
6
-
7
-module.exports = {
8
-  dev: {
9
-
10
-    // Paths
11
-    assetsSubDirectory: 'static',
12
-    assetsPublicPath: '/',
13
-    proxyTable: {},
14
-
15
-    // Various Dev Server settings
16
-    host: 'localhost', // can be overwritten by process.env.HOST
17
-    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18
-    autoOpenBrowser: false,
19
-    errorOverlay: true,
20
-    notifyOnErrors: true,
21
-    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22
-
23
-    
24
-    /**
25
-     * Source Maps
26
-     */
27
-
28
-    // https://webpack.js.org/configuration/devtool/#development
29
-    devtool: 'cheap-module-eval-source-map',
30
-
31
-    // If you have problems debugging vue-files in devtools,
32
-    // set this to false - it *may* help
33
-    // https://vue-loader.vuejs.org/en/options.html#cachebusting
34
-    cacheBusting: true,
35
-
36
-    cssSourceMap: true
37
-  },
38
-
39
-  build: {
40
-    // Template for index.html
41
-    index: path.resolve(__dirname, '../dist/index.html'),
42
-
43
-    // Paths
44
-    assetsRoot: path.resolve(__dirname, '../dist'),
45
-    assetsSubDirectory: 'static',
46
-    assetsPublicPath: '/',
47
-
48
-    /**
49
-     * Source Maps
50
-     */
51
-
52
-    productionSourceMap: true,
53
-    // https://webpack.js.org/configuration/devtool/#production
54
-    devtool: '#source-map',
55
-
56
-    // Gzip off by default as many popular static hosts such as
57
-    // Surge or Netlify already gzip all static assets for you.
58
-    // Before setting to `true`, make sure to:
59
-    // npm install --save-dev compression-webpack-plugin
60
-    productionGzip: false,
61
-    productionGzipExtensions: ['js', 'css'],
62
-
63
-    // Run the build command with an extra argument to
64
-    // View the bundle analyzer report after build finishes:
65
-    // `npm run build --report`
66
-    // Set to `true` or `false` to always turn it on or off
67
-    bundleAnalyzerReport: process.env.npm_config_report
68
-  }
69
-}

+ 0
- 4
client/config/prod.env.js 查看文件

@@ -1,4 +0,0 @@
1
-'use strict'
2
-module.exports = {
3
-  NODE_ENV: '"production"'
4
-}

+ 0
- 12
client/index.html 查看文件

@@ -1,12 +0,0 @@
1
-<!DOCTYPE html>
2
-<html>
3
-  <head>
4
-    <meta charset="utf-8">
5
-    <meta name="viewport" content="width=device-width,initial-scale=1.0">
6
-    <title>client</title>
7
-  </head>
8
-  <body>
9
-    <div id="app"></div>
10
-    <!-- built files will be auto injected -->
11
-  </body>
12
-</html>

+ 0
- 10622
client/package-lock.json
文件差異過大導致無法顯示
查看文件


+ 0
- 62
client/package.json 查看文件

@@ -1,62 +0,0 @@
1
-{
2
-  "name": "client",
3
-  "version": "1.0.0",
4
-  "description": "A Vue.js project",
5
-  "author": "Jared Norris <jtn.asm@comcast.net>",
6
-  "private": true,
7
-  "scripts": {
8
-    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9
-    "start": "npm run dev",
10
-    "build": "node build/build.js"
11
-  },
12
-  "dependencies": {
13
-    "vue": "^2.5.2",
14
-    "vue-router": "^3.0.1"
15
-  },
16
-  "devDependencies": {
17
-    "autoprefixer": "^7.1.2",
18
-    "babel-core": "^6.22.1",
19
-    "babel-helper-vue-jsx-merge-props": "^2.0.3",
20
-    "babel-loader": "^7.1.1",
21
-    "babel-plugin-syntax-jsx": "^6.18.0",
22
-    "babel-plugin-transform-runtime": "^6.22.0",
23
-    "babel-plugin-transform-vue-jsx": "^3.5.0",
24
-    "babel-preset-env": "^1.3.2",
25
-    "babel-preset-stage-2": "^6.22.0",
26
-    "chalk": "^2.0.1",
27
-    "copy-webpack-plugin": "^4.0.1",
28
-    "css-loader": "^0.28.0",
29
-    "extract-text-webpack-plugin": "^3.0.0",
30
-    "file-loader": "^1.1.4",
31
-    "friendly-errors-webpack-plugin": "^1.6.1",
32
-    "html-webpack-plugin": "^2.30.1",
33
-    "node-notifier": "^5.1.2",
34
-    "optimize-css-assets-webpack-plugin": "^3.2.0",
35
-    "ora": "^1.2.0",
36
-    "portfinder": "^1.0.13",
37
-    "postcss-import": "^11.0.0",
38
-    "postcss-loader": "^2.0.8",
39
-    "postcss-url": "^7.2.1",
40
-    "rimraf": "^2.6.0",
41
-    "semver": "^5.3.0",
42
-    "shelljs": "^0.7.6",
43
-    "uglifyjs-webpack-plugin": "^1.1.1",
44
-    "url-loader": "^0.5.8",
45
-    "vue-loader": "^13.3.0",
46
-    "vue-style-loader": "^3.0.1",
47
-    "vue-template-compiler": "^2.5.2",
48
-    "webpack": "^3.6.0",
49
-    "webpack-bundle-analyzer": "^2.9.0",
50
-    "webpack-dev-server": "^2.9.1",
51
-    "webpack-merge": "^4.1.0"
52
-  },
53
-  "engines": {
54
-    "node": ">= 6.0.0",
55
-    "npm": ">= 3.0.0"
56
-  },
57
-  "browserslist": [
58
-    "> 1%",
59
-    "last 2 versions",
60
-    "not ie <= 8"
61
-  ]
62
-}

+ 0
- 23
client/src/App.vue 查看文件

@@ -1,23 +0,0 @@
1
-<template>
2
-  <div id="app">
3
-    <img src="./assets/logo.png">
4
-    <router-view/>
5
-  </div>
6
-</template>
7
-
8
-<script>
9
-export default {
10
-  name: 'App'
11
-}
12
-</script>
13
-
14
-<style>
15
-#app {
16
-  font-family: 'Avenir', Helvetica, Arial, sans-serif;
17
-  -webkit-font-smoothing: antialiased;
18
-  -moz-osx-font-smoothing: grayscale;
19
-  text-align: center;
20
-  color: #2c3e50;
21
-  margin-top: 60px;
22
-}
23
-</style>

二進制
client/src/assets/logo.png 查看文件


+ 0
- 113
client/src/components/HelloWorld.vue 查看文件

@@ -1,113 +0,0 @@
1
-<template>
2
-  <div class="hello">
3
-    <h1>{{ msg }}</h1>
4
-    <h2>Essential Links</h2>
5
-    <ul>
6
-      <li>
7
-        <a
8
-          href="https://vuejs.org"
9
-          target="_blank"
10
-        >
11
-          Core Docs
12
-        </a>
13
-      </li>
14
-      <li>
15
-        <a
16
-          href="https://forum.vuejs.org"
17
-          target="_blank"
18
-        >
19
-          Forum
20
-        </a>
21
-      </li>
22
-      <li>
23
-        <a
24
-          href="https://chat.vuejs.org"
25
-          target="_blank"
26
-        >
27
-          Community Chat
28
-        </a>
29
-      </li>
30
-      <li>
31
-        <a
32
-          href="https://twitter.com/vuejs"
33
-          target="_blank"
34
-        >
35
-          Twitter
36
-        </a>
37
-      </li>
38
-      <br>
39
-      <li>
40
-        <a
41
-          href="http://vuejs-templates.github.io/webpack/"
42
-          target="_blank"
43
-        >
44
-          Docs for This Template
45
-        </a>
46
-      </li>
47
-    </ul>
48
-    <h2>Ecosystem</h2>
49
-    <ul>
50
-      <li>
51
-        <a
52
-          href="http://router.vuejs.org/"
53
-          target="_blank"
54
-        >
55
-          vue-router
56
-        </a>
57
-      </li>
58
-      <li>
59
-        <a
60
-          href="http://vuex.vuejs.org/"
61
-          target="_blank"
62
-        >
63
-          vuex
64
-        </a>
65
-      </li>
66
-      <li>
67
-        <a
68
-          href="http://vue-loader.vuejs.org/"
69
-          target="_blank"
70
-        >
71
-          vue-loader
72
-        </a>
73
-      </li>
74
-      <li>
75
-        <a
76
-          href="https://github.com/vuejs/awesome-vue"
77
-          target="_blank"
78
-        >
79
-          awesome-vue
80
-        </a>
81
-      </li>
82
-    </ul>
83
-  </div>
84
-</template>
85
-
86
-<script>
87
-export default {
88
-  name: 'HelloWorld',
89
-  data () {
90
-    return {
91
-      msg: 'Welcome to Your Vue.js App'
92
-    }
93
-  }
94
-}
95
-</script>
96
-
97
-<!-- Add "scoped" attribute to limit CSS to this component only -->
98
-<style scoped>
99
-h1, h2 {
100
-  font-weight: normal;
101
-}
102
-ul {
103
-  list-style-type: none;
104
-  padding: 0;
105
-}
106
-li {
107
-  display: inline-block;
108
-  margin: 0 10px;
109
-}
110
-a {
111
-  color: #42b983;
112
-}
113
-</style>

+ 0
- 15
client/src/main.js 查看文件

@@ -1,15 +0,0 @@
1
-// The Vue build version to load with the `import` command
2
-// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
-import Vue from 'vue'
4
-import App from './App'
5
-import router from './router'
6
-
7
-Vue.config.productionTip = false
8
-
9
-/* eslint-disable no-new */
10
-new Vue({
11
-  el: '#app',
12
-  router,
13
-  components: { App },
14
-  template: '<App/>'
15
-})

+ 0
- 15
client/src/router/index.js 查看文件

@@ -1,15 +0,0 @@
1
-import Vue from 'vue'
2
-import Router from 'vue-router'
3
-import HelloWorld from '@/components/HelloWorld'
4
-
5
-Vue.use(Router)
6
-
7
-export default new Router({
8
-  routes: [
9
-    {
10
-      path: '/',
11
-      name: 'HelloWorld',
12
-      component: HelloWorld
13
-    }
14
-  ]
15
-})

+ 0
- 0
client/static/.gitkeep 查看文件


+ 0
- 225
mvnw 查看文件

@@ -1,225 +0,0 @@
1
-#!/bin/sh
2
-# ----------------------------------------------------------------------------
3
-# Licensed to the Apache Software Foundation (ASF) under one
4
-# or more contributor license agreements.  See the NOTICE file
5
-# distributed with this work for additional information
6
-# regarding copyright ownership.  The ASF licenses this file
7
-# to you under the Apache License, Version 2.0 (the
8
-# "License"); you may not use this file except in compliance
9
-# with the License.  You may obtain a copy of the License at
10
-#
11
-#    http://www.apache.org/licenses/LICENSE-2.0
12
-#
13
-# Unless required by applicable law or agreed to in writing,
14
-# software distributed under the License is distributed on an
15
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
-# KIND, either express or implied.  See the License for the
17
-# specific language governing permissions and limitations
18
-# under the License.
19
-# ----------------------------------------------------------------------------
20
-
21
-# ----------------------------------------------------------------------------
22
-# Maven2 Start Up Batch script
23
-#
24
-# Required ENV vars:
25
-# ------------------
26
-#   JAVA_HOME - location of a JDK home dir
27
-#
28
-# Optional ENV vars
29
-# -----------------
30
-#   M2_HOME - location of maven2's installed home dir
31
-#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
-#     e.g. to debug Maven itself, use
33
-#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
-#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
-# ----------------------------------------------------------------------------
36
-
37
-if [ -z "$MAVEN_SKIP_RC" ] ; then
38
-
39
-  if [ -f /etc/mavenrc ] ; then
40
-    . /etc/mavenrc
41
-  fi
42
-
43
-  if [ -f "$HOME/.mavenrc" ] ; then
44
-    . "$HOME/.mavenrc"
45
-  fi
46
-
47
-fi
48
-
49
-# OS specific support.  $var _must_ be set to either true or false.
50
-cygwin=false;
51
-darwin=false;
52
-mingw=false
53
-case "`uname`" in
54
-  CYGWIN*) cygwin=true ;;
55
-  MINGW*) mingw=true;;
56
-  Darwin*) darwin=true
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
-    ;;
67
-esac
68
-
69
-if [ -z "$JAVA_HOME" ] ; then
70
-  if [ -r /etc/gentoo-release ] ; then
71
-    JAVA_HOME=`java-config --jre-home`
72
-  fi
73
-fi
74
-
75
-if [ -z "$M2_HOME" ] ; then
76
-  ## resolve links - $0 may be a link to maven's home
77
-  PRG="$0"
78
-
79
-  # need this for relative symlinks
80
-  while [ -h "$PRG" ] ; do
81
-    ls=`ls -ld "$PRG"`
82
-    link=`expr "$ls" : '.*-> \(.*\)$'`
83
-    if expr "$link" : '/.*' > /dev/null; then
84
-      PRG="$link"
85
-    else
86
-      PRG="`dirname "$PRG"`/$link"
87
-    fi
88
-  done
89
-
90
-  saveddir=`pwd`
91
-
92
-  M2_HOME=`dirname "$PRG"`/..
93
-
94
-  # make it fully qualified
95
-  M2_HOME=`cd "$M2_HOME" && pwd`
96
-
97
-  cd "$saveddir"
98
-  # echo Using m2 at $M2_HOME
99
-fi
100
-
101
-# For Cygwin, ensure paths are in UNIX format before anything is touched
102
-if $cygwin ; then
103
-  [ -n "$M2_HOME" ] &&
104
-    M2_HOME=`cygpath --unix "$M2_HOME"`
105
-  [ -n "$JAVA_HOME" ] &&
106
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
107
-  [ -n "$CLASSPATH" ] &&
108
-    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
109
-fi
110
-
111
-# For Migwn, ensure paths are in UNIX format before anything is touched
112
-if $mingw ; then
113
-  [ -n "$M2_HOME" ] &&
114
-    M2_HOME="`(cd "$M2_HOME"; pwd)`"
115
-  [ -n "$JAVA_HOME" ] &&
116
-    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117
-  # TODO classpath?
118
-fi
119
-
120
-if [ -z "$JAVA_HOME" ]; then
121
-  javaExecutable="`which javac`"
122
-  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
123
-    # readlink(1) is not available as standard on Solaris 10.
124
-    readLink=`which readlink`
125
-    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
126
-      if $darwin ; then
127
-        javaHome="`dirname \"$javaExecutable\"`"
128
-        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
129
-      else
130
-        javaExecutable="`readlink -f \"$javaExecutable\"`"
131
-      fi
132
-      javaHome="`dirname \"$javaExecutable\"`"
133
-      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
134
-      JAVA_HOME="$javaHome"
135
-      export JAVA_HOME
136
-    fi
137
-  fi
138
-fi
139
-
140
-if [ -z "$JAVACMD" ] ; then
141
-  if [ -n "$JAVA_HOME"  ] ; then
142
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
143
-      # IBM's JDK on AIX uses strange locations for the executables
144
-      JAVACMD="$JAVA_HOME/jre/sh/java"
145
-    else
146
-      JAVACMD="$JAVA_HOME/bin/java"
147
-    fi
148
-  else
149
-    JAVACMD="`which java`"
150
-  fi
151
-fi
152
-
153
-if [ ! -x "$JAVACMD" ] ; then
154
-  echo "Error: JAVA_HOME is not defined correctly." >&2
155
-  echo "  We cannot execute $JAVACMD" >&2
156
-  exit 1
157
-fi
158
-
159
-if [ -z "$JAVA_HOME" ] ; then
160
-  echo "Warning: JAVA_HOME environment variable is not set."
161
-fi
162
-
163
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
164
-
165
-# traverses directory structure from process work directory to filesystem root
166
-# first directory with .mvn subdirectory is considered project base directory
167
-find_maven_basedir() {
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"
177
-  while [ "$wdir" != '/' ] ; do
178
-    if [ -d "$wdir"/.mvn ] ; then
179
-      basedir=$wdir
180
-      break
181
-    fi
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
187
-  done
188
-  echo "${basedir}"
189
-}
190
-
191
-# concatenates all lines of a file
192
-concat_lines() {
193
-  if [ -f "$1" ]; then
194
-    echo "$(tr -s '\n' ' ' < "$1")"
195
-  fi
196
-}
197
-
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
205
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
206
-
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
218
-
219
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
220
-
221
-exec "$JAVACMD" \
222
-  $MAVEN_OPTS \
223
-  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
224
-  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
225
-  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 0
- 143
mvnw.cmd 查看文件

@@ -1,143 +0,0 @@
1
-@REM ----------------------------------------------------------------------------
2
-@REM Licensed to the Apache Software Foundation (ASF) under one
3
-@REM or more contributor license agreements.  See the NOTICE file
4
-@REM distributed with this work for additional information
5
-@REM regarding copyright ownership.  The ASF licenses this file
6
-@REM to you under the Apache License, Version 2.0 (the
7
-@REM "License"); you may not use this file except in compliance
8
-@REM with the License.  You may obtain a copy of the License at
9
-@REM
10
-@REM    http://www.apache.org/licenses/LICENSE-2.0
11
-@REM
12
-@REM Unless required by applicable law or agreed to in writing,
13
-@REM software distributed under the License is distributed on an
14
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
-@REM KIND, either express or implied.  See the License for the
16
-@REM specific language governing permissions and limitations
17
-@REM under the License.
18
-@REM ----------------------------------------------------------------------------
19
-
20
-@REM ----------------------------------------------------------------------------
21
-@REM Maven2 Start Up Batch script
22
-@REM
23
-@REM Required ENV vars:
24
-@REM JAVA_HOME - location of a JDK home dir
25
-@REM
26
-@REM Optional ENV vars
27
-@REM M2_HOME - location of maven2's installed home dir
28
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
-@REM     e.g. to debug Maven itself, use
32
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
-@REM ----------------------------------------------------------------------------
35
-
36
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
-@echo off
38
-@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
-@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
40
-
41
-@REM set %HOME% to equivalent of $HOME
42
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
-
44
-@REM Execute a user defined script before this one
45
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47
-if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
-if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49
-:skipRcPre
50
-
51
-@setlocal
52
-
53
-set ERROR_CODE=0
54
-
55
-@REM To isolate internal variables from possible post scripts, we use another setlocal
56
-@setlocal
57
-
58
-@REM ==== START VALIDATION ====
59
-if not "%JAVA_HOME%" == "" goto OkJHome
60
-
61
-echo.
62
-echo Error: JAVA_HOME not found in your environment. >&2
63
-echo Please set the JAVA_HOME variable in your environment to match the >&2
64
-echo location of your Java installation. >&2
65
-echo.
66
-goto error
67
-
68
-:OkJHome
69
-if exist "%JAVA_HOME%\bin\java.exe" goto init
70
-
71
-echo.
72
-echo Error: JAVA_HOME is set to an invalid directory. >&2
73
-echo JAVA_HOME = "%JAVA_HOME%" >&2
74
-echo Please set the JAVA_HOME variable in your environment to match the >&2
75
-echo location of your Java installation. >&2
76
-echo.
77
-goto error
78
-
79
-@REM ==== END VALIDATION ====
80
-
81
-:init
82
-
83
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
84
-@REM Fallback to current working directory if not found.
85
-
86
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
87
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
88
-
89
-set EXEC_DIR=%CD%
90
-set WDIR=%EXEC_DIR%
91
-:findBaseDir
92
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
93
-cd ..
94
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
95
-set WDIR=%CD%
96
-goto findBaseDir
97
-
98
-:baseDirFound
99
-set MAVEN_PROJECTBASEDIR=%WDIR%
100
-cd "%EXEC_DIR%"
101
-goto endDetectBaseDir
102
-
103
-:baseDirNotFound
104
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
105
-cd "%EXEC_DIR%"
106
-
107
-:endDetectBaseDir
108
-
109
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
110
-
111
-@setlocal EnableExtensions EnableDelayedExpansion
112
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
113
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
114
-
115
-:endReadAdditionalConfig
116
-
117
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
118
-
119
-set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
120
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
121
-
122
-%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
123
-if ERRORLEVEL 1 goto error
124
-goto end
125
-
126
-:error
127
-set ERROR_CODE=1
128
-
129
-:end
130
-@endlocal & set ERROR_CODE=%ERROR_CODE%
131
-
132
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
133
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
134
-if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
135
-if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
136
-:skipRcPost
137
-
138
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
139
-if "%MAVEN_BATCH_PAUSE%" == "on" pause
140
-
141
-if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
142
-
143
-exit /B %ERROR_CODE%

+ 30
- 58
pom.xml 查看文件

@@ -1,71 +1,43 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+         xmlns="http://maven.apache.org/POM/4.0.0"
3 4
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4 5
     <modelVersion>4.0.0</modelVersion>
5 6
 
6
-    <groupId>com.JARD</groupId>
7
-    <artifactId>you-are-ell</artifactId>
8
-    <version>0.0.1-SNAPSHOT</version>
9
-    <packaging>jar</packaging>
7
+    <groupId>com.zipcoder.ZipChat</groupId>
8
+    <artifactId>access.YouAreEll</artifactId>
9
+    <packaging>pom</packaging>
10
+    <version>1.0-SNAPSHOT</version>
11
+    <modules>
12
+        <module>Client</module>
13
+    </modules>
10 14
 
11
-    <name>you-are-ell</name>
12
-    <description>Demo project for Spring Boot</description>
13
-
14
-    <parent>
15
-        <groupId>org.springframework.boot</groupId>
16
-        <artifactId>spring-boot-starter-parent</artifactId>
17
-        <version>2.0.3.RELEASE</version>
18
-        <relativePath/> <!-- lookup parent from repository -->
19
-    </parent>
20
-
21
-    <properties>
22
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24
-        <java.version>1.8</java.version>
25
-    </properties>
15
+    <build>
16
+    <plugins>
17
+        <plugin>
18
+            <groupId>org.apache.maven.plugins</groupId>
19
+            <artifactId>maven-compiler-plugin</artifactId>
20
+            <configuration>
21
+                <source>1.8</source>
22
+                <target>1.8</target>
23
+            </configuration>
24
+        </plugin>
25
+    </plugins>
26
+    </build>
26 27
 
27 28
     <dependencies>
28 29
         <dependency>
29
-            <groupId>org.springframework.boot</groupId>
30
-            <artifactId>spring-boot-starter-web</artifactId>
30
+            <groupId>com.fasterxml.jackson.core</groupId>
31
+            <artifactId>jackson-databind</artifactId>
32
+            <version>2.8.6</version>
31 33
         </dependency>
32 34
 
35
+        <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
33 36
         <dependency>
34
-            <groupId>org.springframework.boot</groupId>
35
-            <artifactId>spring-boot-starter-test</artifactId>
36
-            <scope>test</scope>
37
-        </dependency>
38
-        <!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
39
-        <dependency>
40
-            <groupId>org.springframework</groupId>
41
-            <artifactId>spring-orm</artifactId>
42
-            <version>5.0.7.RELEASE</version>
43
-        </dependency>
44
-        <!-- https://mvnrepository.com/artifact/org.springframework/spring-hibernate -->
45
-        <dependency>
46
-            <groupId>org.springframework</groupId>
47
-            <artifactId>spring-hibernate</artifactId>
48
-            <version>1.2.9</version>
49
-        </dependency>
50
-        <dependency>
51
-            <groupId>org.springframework.boot</groupId>
52
-            <artifactId>spring-boot-starter-data-jpa</artifactId>
53
-        </dependency>
54
-        <dependency>
55
-            <groupId>org.apache.commons</groupId>
56
-            <artifactId>commons-dbcp2</artifactId>
57
-            <version>2.4.0</version>
37
+            <groupId>com.squareup.okhttp3</groupId>
38
+            <artifactId>okhttp</artifactId>
39
+            <version>3.10.0</version>
58 40
         </dependency>
59
-    </dependencies>
60 41
 
61
-    <build>
62
-        <plugins>
63
-            <plugin>
64
-                <groupId>org.springframework.boot</groupId>
65
-                <artifactId>spring-boot-maven-plugin</artifactId>
66
-            </plugin>
67
-        </plugins>
68
-    </build>
69
-
70
-
71
-</project>
42
+    </dependencies>
43
+</project>

+ 0
- 11
src/main/java/com/jard/youareell/YouAreEllApplication.java 查看文件

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

+ 0
- 5
src/main/java/com/jard/youareell/access/IdDao.java 查看文件

@@ -1,5 +0,0 @@
1
-package com.jard.youareell.access;
2
-
3
-public interface IdDao {
4
-    //TODO: CRUD Method stubs
5
-}

+ 0
- 13
src/main/java/com/jard/youareell/access/IdDaoImpl.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.jard.youareell.access;
2
-
3
-import org.hibernate.SessionFactory;
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.stereotype.Repository;
6
-
7
-@Repository
8
-public class IdDaoImpl implements IdDao {
9
-    @Autowired
10
-    private SessionFactory sf;
11
-
12
-    //TODO: CRUD Methods
13
-}

+ 0
- 5
src/main/java/com/jard/youareell/access/MessageDao.java 查看文件

@@ -1,5 +0,0 @@
1
-package com.jard.youareell.access;
2
-
3
-public interface MessageDao {
4
-    //TODO: CRUD Method stubs
5
-}

+ 0
- 13
src/main/java/com/jard/youareell/access/MessageDaoImpl.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.jard.youareell.access;
2
-
3
-import org.hibernate.SessionFactory;
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.stereotype.Repository;
6
-
7
-@Repository
8
-public class MessageDaoImpl implements MessageDao {
9
-    @Autowired
10
-    private SessionFactory sf;
11
-
12
-    //TODO: CRUD Methods
13
-}

+ 0
- 13
src/main/java/com/jard/youareell/client/controllers/IdController.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.jard.youareell.client.controllers;
2
-
3
-import com.jard.youareell.service.IdService;
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.stereotype.Controller;
6
-
7
-@Controller
8
-public class IdController {
9
-    @Autowired
10
-    private IdService idService;
11
-
12
-    //TODO: Controller Methods
13
-}

+ 0
- 13
src/main/java/com/jard/youareell/client/controllers/MessageController.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.jard.youareell.client.controllers;
2
-
3
-import com.jard.youareell.service.MessageService;
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.stereotype.Controller;
6
-
7
-@Controller
8
-public class MessageController {
9
-    @Autowired
10
-    private MessageService messageService;
11
-
12
-    //TODO: Controller Methods
13
-}

+ 0
- 39
src/main/java/com/jard/youareell/config/DataConfig.java 查看文件

@@ -1,39 +0,0 @@
1
-package com.jard.youareell.config;
2
-
3
-
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.context.annotation.Bean;
6
-import org.springframework.context.annotation.Configuration;
7
-import org.springframework.context.annotation.PropertySource;
8
-import org.springframework.core.env.Environment;
9
-import org.springframework.core.io.ClassPathResource;
10
-import org.apache.commons.dbcp2.BasicDataSource;
11
-import javax.sql.DataSource;
12
-import org.springframework.orm.hibernate5.LocalSessionFactoryBean;
13
-
14
-@Configuration
15
-@PropertySource("application.properties")
16
-public class DataConfig {
17
-    @Autowired
18
-    private Environment env;
19
-
20
-    @Bean
21
-    public LocalSessionFactoryBean sessionFactory() {
22
-        LocalSessionFactoryBean sf = new LocalSessionFactoryBean();
23
-        sf.setConfigLocation(new ClassPathResource("")); //TODO: figure out the server location for the session factory location
24
-        sf.setPackagesToScan(env.getProperty("")); //TODO: set an entity package location in application.properties
25
-        sf.setDataSource(dataSource());
26
-        return sf;
27
-    }
28
-
29
-    @Bean
30
-    public DataSource dataSource() {
31
-        BasicDataSource ds = new BasicDataSource();
32
-        ds.setDriverClassName(env.getProperty("")); //TODO: set a property in application.properties for server driver
33
-        ds.setUrl(env.getProperty("")); //TODO: set database url in application.properties
34
-        /*ds.setUsername(env.getProperty(""));
35
-        ds.setPassword(env.getProperty(""));*/
36
-        //^^^ Just in case I need username / pw
37
-        return ds;
38
-    }
39
-}

+ 0
- 36
src/main/java/com/jard/youareell/model/Id.java 查看文件

@@ -1,36 +0,0 @@
1
-package com.jard.youareell.model;
2
-
3
-import javax.persistence.*;
4
-
5
-@Entity
6
-public class Id {
7
-    //TODO: Have some validation in here
8
-
9
-    private String userid;
10
-    private String name;
11
-    private String github;
12
-
13
-    public String getUserid() {
14
-        return userid;
15
-    }
16
-
17
-    public void setUserid(String userid) {
18
-        this.userid = userid;
19
-    }
20
-
21
-    public String getName() {
22
-        return name;
23
-    }
24
-
25
-    public void setName(String name) {
26
-        this.name = name;
27
-    }
28
-
29
-    public String getGithub() {
30
-        return github;
31
-    }
32
-
33
-    public void setGithub(String github) {
34
-        this.github = github;
35
-    }
36
-}

+ 0
- 5
src/main/java/com/jard/youareell/service/IdService.java 查看文件

@@ -1,5 +0,0 @@
1
-package com.jard.youareell.service;
2
-
3
-public interface IdService {
4
-    //TODO: Routing Method stubs
5
-}

+ 0
- 13
src/main/java/com/jard/youareell/service/IdServiceImpl.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.jard.youareell.service;
2
-
3
-import com.jard.youareell.access.IdDao;
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.stereotype.Service;
6
-
7
-@Service
8
-public class IdServiceImpl implements IdService {
9
-    @Autowired
10
-    private IdDao idDao;
11
-
12
-    //TODO: Routing to DAO requests, input validation
13
-}

+ 0
- 5
src/main/java/com/jard/youareell/service/MessageService.java 查看文件

@@ -1,5 +0,0 @@
1
-package com.jard.youareell.service;
2
-
3
-public interface MessageService {
4
-    //TODO: Routing Method stubs
5
-}

+ 0
- 13
src/main/java/com/jard/youareell/service/MessageServiceImpl.java 查看文件

@@ -1,13 +0,0 @@
1
-package com.jard.youareell.service;
2
-
3
-import com.jard.youareell.access.MessageDao;
4
-import org.springframework.beans.factory.annotation.Autowired;
5
-import org.springframework.stereotype.Service;
6
-
7
-@Service
8
-public class MessageServiceImpl implements MessageService {
9
-    @Autowired
10
-    private MessageDao messageDao;
11
-
12
-    //TODO: Routing to DAO requests, input validation
13
-}

+ 0
- 0
src/main/resources/application.properties 查看文件


+ 0
- 16
src/test/java/com/jard/youareell/YouAreEllApplicationTests.java 查看文件

@@ -1,16 +0,0 @@
1
-package com.jard.youareell;
2
-
3
-import org.junit.Test;
4
-import org.junit.runner.RunWith;
5
-import org.springframework.boot.test.context.SpringBootTest;
6
-import org.springframework.test.context.junit4.SpringRunner;
7
-
8
-@RunWith(SpringRunner.class)
9
-@SpringBootTest
10
-public class YouAreEllApplicationTests {
11
-
12
-    @Test
13
-    public void contextLoads() {
14
-    }
15
-
16
-}