Skip to content

Commit

Permalink
规范化
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed Jan 17, 2022
1 parent b569073 commit fb7ea57
Show file tree
Hide file tree
Showing 70 changed files with 4,446 additions and 4,475 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.sonic</groupId>
<groupId>org.cloud.sonic</groupId>
<artifactId>sonic-agent</artifactId>
<version>v1.3.0-beta1.1</version>
<version>v1.3.0-release</version>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
package com.sonic.agent;

import com.sonic.agent.tools.SpringTool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

/**
* @author ZhouYiXun
* @des Agent端启动类
* @date 2021/08/16 19:26
*/
@Import(SpringTool.class)
@SpringBootApplication
public class AgentApplication {
@Value("${sonic.agent.port}")
private int port;

public static void main(String[] args) {
SpringApplication.run(AgentApplication.class, args);
}

@Bean
public TomcatServletWebServerFactory servletContainer() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(port);
factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]\\"));
return factory;
}
}
package org.cloud.sonic.agent;

import org.cloud.sonic.agent.tools.SpringTool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

/**
* @author ZhouYiXun
* @des Agent端启动类
* @date 2021/08/16 19:26
*/
@Import(SpringTool.class)
@SpringBootApplication
public class AgentApplication {
@Value("${sonic.agent.port}")
private int port;

public static void main(String[] args) {
SpringApplication.run(AgentApplication.class, args);
}

@Bean
public TomcatServletWebServerFactory servletContainer() {
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(port);
factory.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> connector.setProperty("relaxedQueryChars", "|{}[]\\"));
return factory;
}
}
Loading

0 comments on commit fb7ea57

Please sign in to comment.