| @@ -0,0 +1,5 @@ | |||||
| module.exports = { | |||||
| presets: [ | |||||
| '@vue/cli-plugin-babel/preset' | |||||
| ] | |||||
| } | |||||
| @@ -0,0 +1,53 @@ | |||||
| { | |||||
| "name": "app", | |||||
| "version": "0.1.0", | |||||
| "private": true, | |||||
| "scripts": { | |||||
| "serve": "vue-cli-service serve", | |||||
| "build": "vue-cli-service build", | |||||
| "lint": "vue-cli-service lint" | |||||
| }, | |||||
| "dependencies": { | |||||
| "axios": "^0.21.1", | |||||
| "core-js": "^3.6.5", | |||||
| "lodash": "^4.17.20", | |||||
| "vue": "^2.6.11", | |||||
| "vue-router": "^3.5.1", | |||||
| "vuetify": "^2.4.3" | |||||
| }, | |||||
| "devDependencies": { | |||||
| "@vue/cli-plugin-babel": "~4.5.0", | |||||
| "@vue/cli-plugin-eslint": "~4.5.0", | |||||
| "@vue/cli-service": "~4.5.0", | |||||
| "babel-eslint": "^10.1.0", | |||||
| "deepmerge": "^4.2.2", | |||||
| "eslint": "^6.7.2", | |||||
| "eslint-plugin-vue": "^6.2.2", | |||||
| "sass": "^1.32.6", | |||||
| "sass-loader": "^10.1.1", | |||||
| "vue-cli-plugin-vuetify": "^2.1.0", | |||||
| "vue-template-compiler": "^2.6.11", | |||||
| "vuetify-loader": "^1.7.1" | |||||
| }, | |||||
| "eslintConfig": { | |||||
| "root": true, | |||||
| "env": { | |||||
| "node": true | |||||
| }, | |||||
| "extends": [ | |||||
| "plugin:vue/essential", | |||||
| "eslint:recommended" | |||||
| ], | |||||
| "parserOptions": { | |||||
| "parser": "babel-eslint" | |||||
| }, | |||||
| "rules": { | |||||
| "semi": "off" | |||||
| } | |||||
| }, | |||||
| "browserslist": [ | |||||
| "> 1%", | |||||
| "last 2 versions", | |||||
| "not dead" | |||||
| ] | |||||
| } | |||||
| @@ -0,0 +1,17 @@ | |||||
| <!DOCTYPE html> | |||||
| <html lang=""> | |||||
| <head> | |||||
| <meta charset="utf-8"> | |||||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |||||
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |||||
| <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | |||||
| <title><%= htmlWebpackPlugin.options.title %></title> | |||||
| </head> | |||||
| <body> | |||||
| <noscript> | |||||
| <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | |||||
| </noscript> | |||||
| <div id="app"></div> | |||||
| <!-- built files will be auto injected --> | |||||
| </body> | |||||
| </html> | |||||
| @@ -0,0 +1,10 @@ | |||||
| <template> | |||||
| <v-app> | |||||
| <router-view /> | |||||
| </v-app> | |||||
| </template> | |||||
| <script> | |||||
| export default { | |||||
| name: 'App', | |||||
| } | |||||
| </script> | |||||
| @@ -0,0 +1,10 @@ | |||||
| <template> | |||||
| <v-container> | |||||
| <div class="d-flex justify-center font-weight-bold title">Login</div> | |||||
| </v-container> | |||||
| </template> | |||||
| <script> | |||||
| export default { | |||||
| name: 'Login' | |||||
| } | |||||
| </script> | |||||
| @@ -0,0 +1,26 @@ | |||||
| const packageJson = require('../package.json'); | |||||
| module.exports = { | |||||
| title: packageJson.name, | |||||
| /** | |||||
| * @type {String} '0.0.1' | |||||
| * @description Application version. | |||||
| * After the release of the new version, it is reset to the default settings. | |||||
| */ | |||||
| version: packageJson.version, | |||||
| /** | |||||
| * @type {String} 'localStorage' | 'sessionStorage' | |||||
| * @description Storage for user settings and sessions. | |||||
| */ | |||||
| storage: 'localStorage', | |||||
| /** | |||||
| * @type {String} 'vva_' | |||||
| * @description Key prefix for data in storage. | |||||
| */ | |||||
| prefix: `${packageJson.name}_`, | |||||
| }; | |||||
| @@ -0,0 +1,17 @@ | |||||
| import Vue from 'vue' | |||||
| import App from './App.vue' | |||||
| import router from './router/index' | |||||
| import axios from './plugins/axios' | |||||
| import vuetify from '@/plugins/vuetify' | |||||
| Vue.config.productionTip = false | |||||
| new Vue({ | |||||
| router, | |||||
| axios, | |||||
| vuetify, | |||||
| render: h => h(App), | |||||
| }).$mount('#app') | |||||
| @@ -0,0 +1,14 @@ | |||||
| import axios from 'axios'; | |||||
| //在開發環境中的測試 development | |||||
| if(process.env.NODE_ENV === 'development') { | |||||
| axios.defaults.baseURL = '/' | |||||
| } | |||||
| //在生產環境中的測試 production | |||||
| if(process.env.NODE_ENV === 'production') { | |||||
| axios.defaults.baseURL = '/' | |||||
| } | |||||
| axios.defaults.headers.post['Content-Type'] = 'charset=utf-8'; | |||||
| axios.defaults.headers.common.Pragma = 'no-cache'; | |||||
| export default axios | |||||
| @@ -0,0 +1,8 @@ | |||||
| import Vue from 'vue' | |||||
| import Vuetify from 'vuetify/lib' | |||||
| Vue.use(Vuetify) | |||||
| const opts = {} | |||||
| export default new Vuetify(opts) | |||||
| @@ -0,0 +1,32 @@ | |||||
| import Vue from 'vue' | |||||
| import Router from 'vue-router' | |||||
| import Login from '@/components/Login' | |||||
| Vue.use(Router) | |||||
| export const constantRoutes = [ | |||||
| { | |||||
| path: '/', | |||||
| alias: '/login', | |||||
| component: Login, | |||||
| }, | |||||
| // { | |||||
| // path: '/', | |||||
| // component: , | |||||
| // name: '', | |||||
| // children: [ | |||||
| // { | |||||
| // path: '', | |||||
| // component: () => import(''), | |||||
| // name: '', | |||||
| // meta: { | |||||
| // }, | |||||
| // }, | |||||
| // ], | |||||
| // }, | |||||
| ]; | |||||
| export default new Router({ | |||||
| mode: 'history', | |||||
| routes: constantRoutes, | |||||
| }); | |||||
| @@ -0,0 +1,29 @@ | |||||
| const path = require('path'); | |||||
| const config = require('./src/config.js'); | |||||
| function resolve(dir) { | |||||
| return path.join(__dirname, dir); | |||||
| } | |||||
| module.exports= { | |||||
| configureWebpack: { | |||||
| name: config.title, | |||||
| resolve: { | |||||
| alias: { | |||||
| '@': resolve('src'), | |||||
| }, | |||||
| }, | |||||
| }, | |||||
| devServer: { | |||||
| proxy: { | |||||
| '/api': { | |||||
| target: 'http://localhost:8080/api/', | |||||
| changeOrigin: true, | |||||
| pathRewrite: { | |||||
| '^/api': '', | |||||
| }, | |||||
| }, | |||||
| }, | |||||
| disableHostCheck: true, | |||||
| }, | |||||
| outputDir: '../src/main/resources/public/', | |||||
| } | |||||
| @@ -0,0 +1,116 @@ | |||||
| <?xml version="1.0" encoding="UTF-8"?> | |||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||||
| <modelVersion>4.0.0</modelVersion> | |||||
| <!-- <parent>--> | |||||
| <!-- <groupId>org.springframework.boot</groupId>--> | |||||
| <!-- <artifactId>spring-boot-starter-parent</artifactId>--> | |||||
| <!-- <version>2.4.2</version>--> | |||||
| <!-- </parent>--> | |||||
| <groupId>com.moze</groupId> | |||||
| <artifactId>template</artifactId> | |||||
| <version>0.0.1-SNAPSHOT</version> | |||||
| <packaging>jar</packaging> | |||||
| <name>template</name> | |||||
| <description>template project</description> | |||||
| <properties> | |||||
| <java.version>1.8</java.version> | |||||
| <project.mainClass>com.moze.template.TemplateApplication</project.mainClass> | |||||
| <maven.compiler.source>1.8</maven.compiler.source> | |||||
| <maven.compiler.target>1.8</maven.compiler.target> | |||||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||||
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | |||||
| </properties> | |||||
| <!--取代parent--> | |||||
| <dependencyManagement> | |||||
| <dependencies> | |||||
| <dependency> | |||||
| <groupId>org.springframework.boot</groupId> | |||||
| <artifactId>spring-boot-dependencies</artifactId> | |||||
| <version>2.4.2</version> | |||||
| <type>pom</type> | |||||
| <scope>import</scope> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.jdbi</groupId> | |||||
| <artifactId>jdbi3-bom</artifactId> | |||||
| <version>3.18.0</version> | |||||
| <type>pom</type> | |||||
| <scope>import</scope> | |||||
| </dependency> | |||||
| </dependencies> | |||||
| </dependencyManagement> | |||||
| <dependencies> | |||||
| <dependency> | |||||
| <groupId>org.springframework.boot</groupId> | |||||
| <artifactId>spring-boot-starter-web</artifactId> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.springframework.boot</groupId> | |||||
| <artifactId>spring-boot-starter-test</artifactId> | |||||
| <scope>test</scope> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.jdbi</groupId> | |||||
| <artifactId>jdbi3-core</artifactId> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.jdbi</groupId> | |||||
| <artifactId>jdbi3-sqlobject</artifactId> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.jdbi</groupId> | |||||
| <artifactId>jdbi3-postgres</artifactId> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.jdbi</groupId> | |||||
| <artifactId>jdbi3-spring4</artifactId> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.jdbi</groupId> | |||||
| <artifactId>jdbi3-json</artifactId> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.postgresql</groupId> | |||||
| <artifactId>postgresql</artifactId> | |||||
| <version>42.2.18</version> | |||||
| </dependency> | |||||
| <dependency> | |||||
| <groupId>org.projectlombok</groupId> | |||||
| <artifactId>lombok</artifactId> | |||||
| <version>1.18.16</version> | |||||
| <optional>true</optional> | |||||
| </dependency> | |||||
| </dependencies> | |||||
| <build> | |||||
| <plugins> | |||||
| <plugin> | |||||
| <groupId>org.springframework.boot</groupId> | |||||
| <artifactId>spring-boot-maven-plugin</artifactId> | |||||
| <configuration> | |||||
| <mainClass>${project.mainClass}</mainClass> | |||||
| <excludes> | |||||
| <exclude> | |||||
| <groupId>org.projectlombok</groupId> | |||||
| <artifactId>lombok</artifactId> | |||||
| </exclude> | |||||
| </excludes> | |||||
| </configuration> | |||||
| </plugin> | |||||
| </plugins> | |||||
| </build> | |||||
| </project> | |||||
| @@ -0,0 +1,14 @@ | |||||
| package com.moze.template; | |||||
| import org.springframework.boot.SpringApplication; | |||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |||||
| @SpringBootApplication | |||||
| public class TemplateApplication { | |||||
| public static void main(String[] args) { | |||||
| SpringApplication.run(TemplateApplication.class, args); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,6 @@ | |||||
| server.servlet.context-path=/ | |||||
| spring.datasource.url=jdbc:postgresql:// | |||||
| spring.datasource.username= | |||||
| spring.datasource.password= | |||||
| @@ -0,0 +1,3 @@ | |||||
| spring.datasource.url=jdbc:postgresql:// | |||||
| spring.datasource.username= | |||||
| spring.datasource.password= | |||||
| @@ -0,0 +1,4 @@ | |||||
| spring.profiles.active=dev | |||||
| #spring.profiles.active=pro | |||||
| server.port=8080 | |||||
| @@ -0,0 +1 @@ | |||||
| <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>rms</title><link href="/css/chunk-vendors.2dfa6bfc.css" rel="preload" as="style"><link href="/js/app.610c5841.js" rel="preload" as="script"><link href="/js/chunk-vendors.a76ed89c.js" rel="preload" as="script"><link href="/css/chunk-vendors.2dfa6bfc.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but rms doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.a76ed89c.js"></script><script src="/js/app.610c5841.js"></script></body></html> | |||||
| @@ -0,0 +1,2 @@ | |||||
| (function(e){function n(n){for(var r,u,l=n[0],c=n[1],i=n[2],p=0,s=[];p<l.length;p++)u=l[p],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&s.push(o[u][0]),o[u]=0;for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(e[r]=c[r]);f&&f(n);while(s.length)s.shift()();return a.push.apply(a,i||[]),t()}function t(){for(var e,n=0;n<a.length;n++){for(var t=a[n],r=!0,l=1;l<t.length;l++){var c=t[l];0!==o[c]&&(r=!1)}r&&(a.splice(n--,1),e=u(u.s=t[0]))}return e}var r={},o={app:0},a=[];function u(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.m=e,u.c=r,u.d=function(e,n,t){u.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},u.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,n){if(1&n&&(e=u(e)),8&n)return e;if(4&n&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)u.d(t,r,function(n){return e[n]}.bind(null,r));return t},u.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return u.d(n,"a",n),n},u.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},u.p="/";var l=window["webpackJsonp"]=window["webpackJsonp"]||[],c=l.push.bind(l);l.push=n,l=l.slice();for(var i=0;i<l.length;i++)n(l[i]);var f=c;a.push([0,"chunk-vendors"]),t()})({0:function(e,n,t){e.exports=t("56d7")},"56d7":function(e,n,t){"use strict";t.r(n);t("e260"),t("e6cf"),t("cca6"),t("a79d");var r=t("2b0e"),o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("router-view")},a=[],u={name:"App"},l=u,c=t("2877"),i=Object(c["a"])(l,o,a,!1,null,null,null),f=i.exports,p=t("8c4f"),s=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("div",[e._v(" Login ")])},d=[],v={name:"Login"},h=v,b=Object(c["a"])(h,s,d,!1,null,null,null),y=b.exports;r["a"].use(p["a"]);var g=[{path:"/",alias:"/login",component:y}],m=new p["a"]({mode:"history",routes:g}),w=t("bc3a"),O=t.n(w);O.a.defaults.baseURL="/",O.a.defaults.headers.post["Content-Type"]="charset=utf-8",O.a.defaults.headers.common.Pragma="no-cache";var j=O.a,_=t("f309");r["a"].use(_["a"]);var x={},P=new _["a"](x);r["a"].config.productionTip=!1,new r["a"]({router:m,axios:j,vuetify:P,render:function(e){return e(f)}}).$mount("#app")}}); | |||||
| //# sourceMappingURL=app.610c5841.js.map | |||||
| @@ -0,0 +1,13 @@ | |||||
| package com.moze.template; | |||||
| import org.junit.jupiter.api.Test; | |||||
| import org.springframework.boot.test.context.SpringBootTest; | |||||
| @SpringBootTest | |||||
| class TemplateApplicationTests { | |||||
| @Test | |||||
| void contextLoads() { | |||||
| } | |||||
| } | |||||