fix : vue.js auto build code ADD

This commit is contained in:
minseokkang
2022-11-11 11:46:14 +09:00
parent d7ff868cff
commit eee5ebaa3b
3 changed files with 34 additions and 1 deletions

View File

@@ -2,6 +2,15 @@ plugins {
id 'org.springframework.boot' version '2.7.3'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
id "com.github.node-gradle.node" version "3.1.1"
}
node {
version = '14.15.4'
npmVersion = '6.14.10'
workDir = file("./src/frontend")
npmWorkDir = file("./src/frontend")
nodeModulesDir = file("./src/frontend")
}
group = 'com.io'
@@ -42,3 +51,17 @@ dependencies {
tasks.named('test') {
useJUnitPlatform()
}
task setUp(type: NpmTask){
description = "Install Node.js packages!"
args = ['install']
inputs.files file('package.json')
outputs.files file('node_modules');
}
task buildFrontEnd(type: NpmTask, dependsOn: setUp){
description = "Build Vue.js"
args = ['run', 'build']
}
processResources.dependsOn 'buildFrontEnd'

View File

@@ -34,7 +34,7 @@ public class WebConfig {
public SecurityFilterChain resources(HttpSecurity http) throws Exception {
http.csrf().disable()
.requestMatchers((matchers) -> {matchers.antMatchers("/h2-console/**");
matchers.antMatchers(HttpMethod.GET,"/api/articles/**");})
matchers.antMatchers(HttpMethod.GET,"/api/articles/**","/");})
.authorizeHttpRequests((authorize) -> authorize.anyRequest().permitAll())
.requestCache().disable()
.securityContext().disable()

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
hello
</body>
</html>