Commit 61a446be authored by liaozan's avatar liaozan 🏀

chore: upgrade node version

parent 50c7a225
package com.schbrain.archetype.initializer.config; package com.schbrain.archetype.initializer.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
...@@ -11,8 +14,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; ...@@ -11,8 +14,14 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration(proxyBeanMethods = false) @Configuration(proxyBeanMethods = false)
public class WebConfiguration implements WebMvcConfigurer { public class WebConfiguration implements WebMvcConfigurer {
@Autowired
private Environment environment;
@Override @Override
public void addCorsMappings(CorsRegistry registry) { public void addCorsMappings(CorsRegistry registry) {
if (CloudPlatform.KUBERNETES.isActive(environment)) {
return;
}
registry.addMapping("/**") registry.addMapping("/**")
.allowedOrigins("*") .allowedOrigins("*")
.allowedMethods("*") .allowedMethods("*")
......
...@@ -19,15 +19,16 @@ ...@@ -19,15 +19,16 @@
<groupId>com.github.eirslett</groupId> <groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId> <artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version> <version>${frontend-maven-plugin.version}</version>
<configuration>
<nodeVersion>v17.7.2</nodeVersion>
<nodeDownloadRoot>https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/</nodeDownloadRoot>
</configuration>
<executions> <executions>
<execution> <execution>
<id>install node and npm</id> <id>install node and npm</id>
<goals> <goals>
<goal>install-node-and-npm</goal> <goal>install-node-and-npm</goal>
</goals> </goals>
<configuration>
<nodeVersion>v17.7.1</nodeVersion>
</configuration>
</execution> </execution>
<!-- Install all project dependencies --> <!-- Install all project dependencies -->
<execution> <execution>
......
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