Commit 29f03886 authored by liaozan's avatar liaozan 🏀

no messages

parent 70d688e9
...@@ -39,7 +39,7 @@ public class ArchetypeController { ...@@ -39,7 +39,7 @@ public class ArchetypeController {
* 生成项目 * 生成项目
*/ */
@PostMapping("/archetype/generate") @PostMapping("/archetype/generate")
public ResponseDTO<String> generateArchetype(@RequestBody @Validated ArchetypeGenerateParam param) { public ResponseDTO<String> generateArchetype(@RequestBody @Validated ArchetypeGenerateParam param) throws FileNotFoundException {
return ResponseDTO.success(archetypeService.generate(param)); return ResponseDTO.success(archetypeService.generate(param));
} }
......
...@@ -45,9 +45,10 @@ public class ArchetypeService { ...@@ -45,9 +45,10 @@ public class ArchetypeService {
private final Path gitKeepFile = createGitKeepFile(SystemUtil.getUserInfo().getTempDir()); private final Path gitKeepFile = createGitKeepFile(SystemUtil.getUserInfo().getTempDir());
public String generate(ArchetypeGenerateParam param) { public String generate(ArchetypeGenerateParam param) throws FileNotFoundException {
String generateId = MavenUtils.generate(param); String generateId = MavenUtils.generate(param);
archetypeNameCache.put(generateId, param.getArtifactId()); archetypeNameCache.put(generateId, param.getArtifactId());
preview(generateId);
return generateId; return generateId;
} }
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
"dependencies": { "dependencies": {
"vue": "^3.3.4", "vue": "^3.3.4",
"axios": "^1.4.0", "axios": "^1.4.0",
"ant-design-vue": "^3.2.20", "ant-design-vue": "^4.0.0",
"highlight.js": "^11.8.0", "highlight.js": "^11.8.0",
"@highlightjs/vue-plugin": "^2.1.0" "@highlightjs/vue-plugin": "^2.1.0"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^4.2.3", "@vitejs/plugin-vue": "^4.2.3",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"vite": "^4.4.2", "vite": "^4.4.4",
"vue-tsc": "^1.8.4" "vue-tsc": "^1.8.5"
} }
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ import {createApp} from 'vue' ...@@ -2,7 +2,7 @@ import {createApp} from 'vue'
import App from './App.vue' import App from './App.vue'
import Antd from 'ant-design-vue' import Antd from 'ant-design-vue'
import './index.css' import './index.css'
import 'ant-design-vue/dist/antd.css'; import 'ant-design-vue/dist/reset.css';
import 'highlight.js/styles/stackoverflow-light.css' import 'highlight.js/styles/stackoverflow-light.css'
import highlight from 'highlight.js/lib/common'; import highlight from 'highlight.js/lib/common';
import highlightVuePlugin from '@highlightjs/vue-plugin' import highlightVuePlugin from '@highlightjs/vue-plugin'
...@@ -12,4 +12,4 @@ highlight.configure({}) ...@@ -12,4 +12,4 @@ highlight.configure({})
const app = createApp(App) const app = createApp(App)
app.use(highlightVuePlugin) app.use(highlightVuePlugin)
app.use(Antd) app.use(Antd)
app.mount('#app') app.mount('#app')
\ 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