Commit f949019f authored by liaozan's avatar liaozan 🏀

Initial Commit

parents
# maven ignore
target/
*.jar
!.mvn/wrapper/*
*.war
*.zip
*.tar
*.tar.gz
.flattened-pom.xml
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# temp ignore
*.log*
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
# log
logs
# maven ignore
target/
*.jar
!.mvn/wrapper/*
*.war
*.zip
*.tar
*.tar.gz
.flattened-pom.xml
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# temp ignore
*.log*
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
# log
logs
<?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>com.schbrain.archetype</groupId>
<artifactId>schbrain-archetype-initializer</artifactId>
<version>${revision}</version>
</parent>
<artifactId>initializer-backend</artifactId>
<dependencies>
<dependency>
<groupId>com.schbrain.common</groupId>
<artifactId>web-common</artifactId>
</dependency>
<dependency>
<groupId>com.schbrain.framework</groupId>
<artifactId>logger-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.schbrain.maven.plugin</groupId>
<artifactId>integration-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.schbrain.archetype.initializer.backend;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class InitializerBackendApplication {
public static void main(String[] args) {
SpringApplication.run(InitializerBackendApplication.class, args);
}
}
\ No newline at end of file
spring:
application:
name: initializer-backend
profiles:
active: dev
\ No newline at end of file
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# schbrain-archetype-initializer
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
This diff is collapsed.
{
"name": "schbrain-archetype-initializer-ui",
"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.26.1",
"core-js": "^3.8.3",
"vue": "^3.2.13",
"vue-router": "^4.0.14"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-service": "~5.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead",
"not ie 11"
]
}
\ No newline at end of file
<?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>com.schbrain.archetype</groupId>
<artifactId>schbrain-archetype-initializer</artifactId>
<version>${revision}</version>
</parent>
<artifactId>initializer-ui</artifactId>
</project>
\ No newline at end of file
<!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>
<template>
<BackendStarter/>
</template>
<script>
import BackendStarter from './components/BackendStarter'
export default {
components: {
BackendStarter
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
\ No newline at end of file
<template>
<div class="generate-form">
<div class="generate-form-div generate-form-label generate-form-input">
<label>Group</label>
<input type="text" id="input-group" v-model="generateForm.group">
</div>
<div class="generate-form-div generate-form-label generate-form-input">
<label for="input-artifact">Artifact</label>
<input type="text" id="input-artifact" v-model="generateForm.artifact">
</div>
<div class="generate-form-div generate-form-label generate-form-input">
<label for="input-name">Name</label>
<input type="text" id="input-name" v-model="generateForm.name">
</div>
<div class="generate-form-div generate-form-label generate-form-input">
<label for="input-packageName">Package name</label>
<input type="text" id="input-packageName" v-model="generateForm.packageName">
</div>
<br>
<input class="generate-form-submit" type="button" @click="submit" value="下载">
</div>
</template>
<script>
import $ from '../util/util'
export default {
name: "BackendStarter",
data() {
return {
generateForm: {
projectName: '',
gitlabUrl: '',
group: '',
artifact: '',
name: '',
packageName: ''
}
}
},
methods: {
submit: function () {
$.http.post('/api/devops/generate', this.generateForm, {
responseType: 'blob'
}).then(res => {
let fileName = window.decodeURI(res.headers['content-disposition'].split('=')[1])
let blob = new Blob([res.data])
let link = document.createElement('a');
link.style.display = "none";
link.href = window.URL.createObjectURL(blob);
link.download = fileName;
document.body.appendChild(link);
link.click();
//释放内存
window.URL.revokeObjectURL(link.href);
document.body.removeChild(link);
})
}
}
}
</script>
<style scoped>
.generate-form {
width: 30%;
margin: 50px auto 0;
}
.generate-form-div {
width: 100%;
height: 40px;
padding-left: 50px;
}
.generate-form-label {
text-align: left;
font-size: 16px;
}
.generate-form-input {
}
.generate-form-submit {
text-align: left;
alignment: left;
align-self: self-start;
margin-left: 50px;
}
</style>
\ No newline at end of file
import {createApp} from 'vue'
import vRouter from './router'
import App from './App.vue'
const app = createApp(App)
app.use(vRouter)
app.mount('#app')
\ No newline at end of file
import BackendStarter from "@/components/BackendStarter";
import {createRouter, createWebHistory} from 'vue-router'
const routes = [
{path: '/', component: BackendStarter},
]
const options = {
history: createWebHistory(),
routes,
}
const router = createRouter(options)
export default router
\ No newline at end of file
import axios from 'axios';
const Util = {
apiPath: 'http://127.0.0.1:8010/'
};
// http 通用配置
Util.http = axios.create({
baseURL: Util.apiPath
});
export default Util;
\ No newline at end of file
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true
})
<?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>com.schbrain.framework</groupId>
<artifactId>schbrain-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>com.schbrain.archetype</groupId>
<artifactId>schbrain-archetype-initializer</artifactId>
<packaging>pom</packaging>
<version>${revision}</version>
<properties>
<revision>0.0.1-SNAPSHOT</revision>
</properties>
<modules>
<module>initializer-backend</module>
<module>initializer-ui</module>
</modules>
</project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment