| @@ -0,0 +1,2 @@ | |||||
| /.idea/ | |||||
| /src/main/resources/public/ | |||||
| @@ -0,0 +1,5 @@ | |||||
| module.exports = { | |||||
| presets: [ | |||||
| '@vue/cli-plugin-babel/preset' | |||||
| ] | |||||
| } | |||||
| @@ -0,0 +1,53 @@ | |||||
| { | |||||
| "name": "rms", | |||||
| "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,115 @@ | |||||
| <?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>rms</artifactId> | |||||
| <version>0.0.1-SNAPSHOT</version> | |||||
| <packaging>jar</packaging> | |||||
| <name>rms</name> | |||||
| <properties> | |||||
| <java.version>1.8</java.version> | |||||
| <project.mainClass>com.moze.rms.RmsApplication</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.rms; | |||||
| import org.springframework.boot.SpringApplication; | |||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |||||
| @SpringBootApplication | |||||
| public class RmsApplication { | |||||
| public static void main(String[] args) { | |||||
| SpringApplication.run(RmsApplication.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,13 @@ | |||||
| package com.moze.rms; | |||||
| import org.junit.jupiter.api.Test; | |||||
| import org.springframework.boot.test.context.SpringBootTest; | |||||
| @SpringBootTest | |||||
| class RmsApplicationTests { | |||||
| @Test | |||||
| void contextLoads() { | |||||
| } | |||||
| } | |||||