package 정리
This commit is contained in:
@@ -1,42 +0,0 @@
|
|||||||
package com.eactive.httpmockserver;
|
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/echo")
|
|
||||||
public class EchoServiceController {
|
|
||||||
|
|
||||||
Logger logger = LoggerFactory.getLogger(EchoServiceController.class);
|
|
||||||
|
|
||||||
public static int count=0;
|
|
||||||
public static Object mon=new Object();
|
|
||||||
|
|
||||||
public static Map<String, String> responseMap = new ConcurrentHashMap<String, String>();
|
|
||||||
|
|
||||||
@PostMapping
|
|
||||||
@ResponseStatus(value = HttpStatus.OK)
|
|
||||||
public byte[] service(HttpServletRequest requestEntity) throws FileNotFoundException, IOException{
|
|
||||||
String readString = null;
|
|
||||||
byte[] readByte = null;
|
|
||||||
try {
|
|
||||||
readByte = IOUtils.toByteArray(requestEntity.getInputStream());
|
|
||||||
readString = new String(readByte);
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
logger.debug("echo \n"+readString);
|
|
||||||
|
|
||||||
return readByte;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-2
@@ -4,10 +4,10 @@ import org.springframework.boot.SpringApplication;
|
|||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class HttpmockserverApplication {
|
public class HttpMockServerApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(HttpmockserverApplication.class, args);
|
SpringApplication.run(HttpMockServerApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver;
|
||||||
|
|
||||||
import com.eactive.httpmockserver.script.ScriptInfoService;
|
import com.eactive.httpmockserver.script.service.ScriptInfoService;
|
||||||
import com.eactive.httpmockserver.script.ScriptLoader;
|
import com.eactive.httpmockserver.script.ScriptLoader;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -10,8 +9,6 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class PostConstructBean {
|
public class PostConstructBean {
|
||||||
|
|||||||
+15
-17
@@ -1,30 +1,28 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.controller;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiInfo;
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiServiceKey;
|
||||||
|
import com.eactive.httpmockserver.script.Script;
|
||||||
|
import com.eactive.httpmockserver.script.ScriptLoader;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiService;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiServiceKeyService;
|
||||||
|
import com.jayway.jsonpath.DocumentContext;
|
||||||
|
import com.jayway.jsonpath.JsonPath;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpEntity;
|
import org.springframework.http.*;
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.server.ResponseStatusException;
|
import org.springframework.web.server.ResponseStatusException;
|
||||||
|
|
||||||
import com.eactive.httpmockserver.script.Script;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.eactive.httpmockserver.script.ScriptLoader;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.jayway.jsonpath.DocumentContext;
|
import java.util.Map;
|
||||||
import com.jayway.jsonpath.JsonPath;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class ApiController {
|
public class ApiController {
|
||||||
+8
-6
@@ -1,9 +1,10 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.controller;
|
||||||
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiInfo;
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiServiceKey;
|
||||||
|
import com.eactive.httpmockserver.script.service.ScriptInfoService;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiService;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiServiceKeyService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpMethod;
|
import org.springframework.http.HttpMethod;
|
||||||
@@ -16,7 +17,8 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import com.eactive.httpmockserver.script.ScriptInfoService;
|
import javax.validation.Valid;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class ApiManageController {
|
public class ApiManageController {
|
||||||
+18
-24
@@ -1,31 +1,25 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.data.domain.Example;
|
|
||||||
import org.springframework.data.domain.ExampleMatcher;
|
|
||||||
import org.springframework.data.domain.ExampleMatcher.GenericPropertyMatcher;
|
|
||||||
import org.springframework.data.domain.PageRequest;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
import org.springframework.data.domain.Sort;
|
|
||||||
import org.springframework.data.domain.Sort.Direction;
|
|
||||||
import org.springframework.data.domain.Sort.Order;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.server.ResponseStatusException;
|
|
||||||
|
|
||||||
import com.eactive.httpmockserver.datatables.Column;
|
import com.eactive.httpmockserver.datatables.Column;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiInfo;
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiServiceKey;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiService;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiServiceKeyService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.domain.*;
|
||||||
|
import org.springframework.data.domain.ExampleMatcher.GenericPropertyMatcher;
|
||||||
|
import org.springframework.data.domain.Sort.Direction;
|
||||||
|
import org.springframework.data.domain.Sort.Order;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.server.ResponseStatusException;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/manage")
|
@RequestMapping("/manage")
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.eactive.httpmockserver.api.controller;
|
||||||
|
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/echo")
|
||||||
|
public class EchoServiceController {
|
||||||
|
|
||||||
|
Logger logger = LoggerFactory.getLogger(EchoServiceController.class);
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@ResponseStatus(value = HttpStatus.OK)
|
||||||
|
public byte[] service(HttpServletRequest requestEntity) throws IOException {
|
||||||
|
String readString = null;
|
||||||
|
byte[] readByte = null;
|
||||||
|
try {
|
||||||
|
readByte = IOUtils.toByteArray(requestEntity.getInputStream());
|
||||||
|
readString = new String(readByte);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
logger.debug("echo \n{}", readString);
|
||||||
|
|
||||||
|
return readByte;
|
||||||
|
}
|
||||||
|
}
|
||||||
+19
-29
@@ -1,30 +1,16 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.controller;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.security.KeyManagementException;
|
|
||||||
import java.security.KeyStoreException;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.HttpResponseInfo;
|
||||||
|
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
||||||
|
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
||||||
|
import com.eactive.httpmockserver.api.entity.HttpRequestInfo;
|
||||||
|
import com.eactive.httpmockserver.api.service.HttpRequestInfoService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.http.Header;
|
import org.apache.http.Header;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
import org.apache.http.NameValuePair;
|
import org.apache.http.NameValuePair;
|
||||||
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
import org.apache.http.client.entity.UrlEncodedFormEntity;
|
||||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
import org.apache.http.client.methods.*;
|
||||||
import org.apache.http.client.methods.HttpDelete;
|
|
||||||
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
|
|
||||||
import org.apache.http.client.methods.HttpGet;
|
|
||||||
import org.apache.http.client.methods.HttpPost;
|
|
||||||
import org.apache.http.client.methods.HttpPut;
|
|
||||||
import org.apache.http.client.methods.HttpRequestBase;
|
|
||||||
import org.apache.http.client.utils.URIBuilder;
|
import org.apache.http.client.utils.URIBuilder;
|
||||||
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
import org.apache.http.conn.ssl.NoopHostnameVerifier;
|
||||||
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
|
||||||
@@ -48,15 +34,19 @@ import org.springframework.http.MediaType;
|
|||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
import javax.validation.Valid;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
import java.io.IOException;
|
||||||
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.KeyStoreException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class HttpRequestInfoController {
|
public class HttpRequestInfoController {
|
||||||
+4
-3
@@ -1,7 +1,6 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.dao;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiInfo;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
@@ -9,6 +8,8 @@ import org.springframework.data.jpa.repository.Query;
|
|||||||
import org.springframework.data.repository.query.Param;
|
import org.springframework.data.repository.query.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface ApiDao extends JpaRepository<ApiInfo, Long> {
|
public interface ApiDao extends JpaRepository<ApiInfo, Long> {
|
||||||
ApiInfo findByUrlAndServiceValue(String url, String serviceValue);
|
ApiInfo findByUrlAndServiceValue(String url, String serviceValue);
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.dao;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiServiceKey;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.dao;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.HttpRequestInfo;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
+3
-12
@@ -1,19 +1,10 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.persistence.*;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.GenerationType;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.Index;
|
|
||||||
import javax.persistence.Lob;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import javax.persistence.UniqueConstraint;
|
|
||||||
import javax.validation.constraints.Digits;
|
import javax.validation.constraints.Digits;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.Positive;
|
import javax.validation.constraints.Positive;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Entity
|
@Entity
|
||||||
+3
-10
@@ -1,15 +1,8 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.persistence.*;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.GenerationType;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import javax.persistence.UniqueConstraint;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Entity
|
@Entity
|
||||||
+3
-11
@@ -1,16 +1,8 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.entity;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.persistence.*;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.GenerationType;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.Index;
|
|
||||||
import javax.persistence.Lob;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Entity
|
@Entity
|
||||||
+5
-4
@@ -1,11 +1,12 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.service;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiInfo;
|
||||||
|
import org.springframework.data.domain.Example;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.springframework.data.domain.Example;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
|
|
||||||
public interface ApiService {
|
public interface ApiService {
|
||||||
public Optional<ApiInfo> findById(Long id);
|
public Optional<ApiInfo> findById(Long id);
|
||||||
|
|
||||||
+5
-4
@@ -1,11 +1,12 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.service;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiServiceKey;
|
||||||
|
import org.springframework.data.domain.Example;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.springframework.data.domain.Example;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
|
|
||||||
public interface ApiServiceKeyService {
|
public interface ApiServiceKeyService {
|
||||||
public ApiServiceKey save(ApiServiceKey apiServiceKey);
|
public ApiServiceKey save(ApiServiceKey apiServiceKey);
|
||||||
|
|
||||||
+5
-4
@@ -1,11 +1,12 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.service;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.entity.HttpRequestInfo;
|
||||||
|
import org.springframework.data.domain.Example;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.springframework.data.domain.Example;
|
|
||||||
import org.springframework.data.domain.Pageable;
|
|
||||||
|
|
||||||
public interface HttpRequestInfoService {
|
public interface HttpRequestInfoService {
|
||||||
public Optional<HttpRequestInfo> findById(Long id);
|
public Optional<HttpRequestInfo> findById(Long id);
|
||||||
|
|
||||||
+9
-6
@@ -1,9 +1,8 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.dao.ApiDao;
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiInfo;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -12,6 +11,10 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(propagation = Propagation.SUPPORTS)
|
@Transactional(propagation = Propagation.SUPPORTS)
|
||||||
public class ApiServiceImpl implements ApiService {
|
public class ApiServiceImpl implements ApiService {
|
||||||
@@ -34,7 +37,7 @@ public class ApiServiceImpl implements ApiService {
|
|||||||
if (pagedResult.hasContent()) {
|
if (pagedResult.hasContent()) {
|
||||||
return pagedResult.getContent();
|
return pagedResult.getContent();
|
||||||
} else {
|
} else {
|
||||||
return new ArrayList<ApiInfo>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+8
-5
@@ -1,9 +1,8 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.dao.ApiServiceKeyDao;
|
||||||
|
import com.eactive.httpmockserver.api.entity.ApiServiceKey;
|
||||||
|
import com.eactive.httpmockserver.api.service.ApiServiceKeyService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -12,6 +11,10 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(propagation = Propagation.SUPPORTS)
|
@Transactional(propagation = Propagation.SUPPORTS)
|
||||||
public class ApiServiceKeyServiceImpl implements ApiServiceKeyService {
|
public class ApiServiceKeyServiceImpl implements ApiServiceKeyService {
|
||||||
+8
-5
@@ -1,9 +1,8 @@
|
|||||||
package com.eactive.httpmockserver;
|
package com.eactive.httpmockserver.api.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.api.dao.HttpRequestInfoDao;
|
||||||
|
import com.eactive.httpmockserver.api.entity.HttpRequestInfo;
|
||||||
|
import com.eactive.httpmockserver.api.service.HttpRequestInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -12,6 +11,10 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(propagation = Propagation.SUPPORTS)
|
@Transactional(propagation = Propagation.SUPPORTS)
|
||||||
public class HttpRequestInfoServiceImpl implements HttpRequestInfoService {
|
public class HttpRequestInfoServiceImpl implements HttpRequestInfoService {
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.eactive.httpmockserver.script;
|
package com.eactive.httpmockserver.script;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.script.entity.ScriptInfo;
|
||||||
|
import com.eactive.httpmockserver.script.service.ScriptInfoService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.SystemUtils;
|
import org.apache.commons.lang3.SystemUtils;
|
||||||
import org.mdkt.compiler.InMemoryJavaCompiler;
|
import org.mdkt.compiler.InMemoryJavaCompiler;
|
||||||
@@ -17,10 +19,10 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class ScriptLoader{
|
public class ScriptLoader{
|
||||||
String path = ScriptLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();
|
String path = ScriptLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();
|
||||||
public static String DYNAMIC_BASE_PACKAGE = "com.eactive.httpmockserver.script.dynamic";
|
public static final String DYNAMIC_BASE_PACKAGE = "com.eactive.httpmockserver.script.dynamic";
|
||||||
public static String DYNAMIC_BASE_PATH = DYNAMIC_BASE_PACKAGE.replaceAll("[.]","/");
|
public static final String DYNAMIC_BASE_PATH = DYNAMIC_BASE_PACKAGE.replaceAll("[.]","/");
|
||||||
public static String JAR_PREFIX = SystemUtils.IS_OS_WINDOWS ? "jar:file:/" : "jar:file:";
|
public static final String JAR_PREFIX = SystemUtils.IS_OS_WINDOWS ? "jar:file:/" : "jar:file:";
|
||||||
public static String CLASS_PATH_SEPARATOR = System.getProperty("path.separator");
|
public static final String CLASS_PATH_SEPARATOR = System.getProperty("path.separator");
|
||||||
|
|
||||||
|
|
||||||
private static final ScriptLoader instance = new ScriptLoader();
|
private static final ScriptLoader instance = new ScriptLoader();
|
||||||
|
|||||||
+5
-8
@@ -1,8 +1,11 @@
|
|||||||
package com.eactive.httpmockserver.script;
|
package com.eactive.httpmockserver.script.controller;
|
||||||
|
|
||||||
import com.eactive.httpmockserver.ApiManageRestController;
|
import com.eactive.httpmockserver.api.controller.ApiManageRestController;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
||||||
|
import com.eactive.httpmockserver.script.ScriptLoader;
|
||||||
|
import com.eactive.httpmockserver.script.entity.ScriptInfo;
|
||||||
|
import com.eactive.httpmockserver.script.service.ScriptInfoService;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -17,15 +20,9 @@ import org.springframework.ui.Model;
|
|||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.tools.JavaCompiler;
|
|
||||||
import javax.tools.ToolProvider;
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLClassLoader;
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
package com.eactive.httpmockserver.script;
|
package com.eactive.httpmockserver.script.dao;
|
||||||
|
|
||||||
import com.eactive.httpmockserver.socket.BytesMessageSpec;
|
import com.eactive.httpmockserver.script.entity.ScriptInfo;
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
import org.springframework.data.jpa.repository.Modifying;
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.eactive.httpmockserver.script;
|
package com.eactive.httpmockserver.script.entity;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.*;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
package com.eactive.httpmockserver.script;
|
package com.eactive.httpmockserver.script.service;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.script.entity.ScriptInfo;
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
+3
-1
@@ -1,5 +1,7 @@
|
|||||||
package com.eactive.httpmockserver.script;
|
package com.eactive.httpmockserver.script.service;
|
||||||
|
|
||||||
|
import com.eactive.httpmockserver.script.dao.ScriptInfoDao;
|
||||||
|
import com.eactive.httpmockserver.script.entity.ScriptInfo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -1,25 +1,14 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.persistence.*;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.FetchType;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.GenerationType;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.persistence.JoinColumn;
|
|
||||||
import javax.persistence.Lob;
|
|
||||||
import javax.persistence.OneToMany;
|
|
||||||
import javax.persistence.OrderBy;
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Positive;
|
import javax.validation.constraints.Positive;
|
||||||
import javax.validation.constraints.PositiveOrZero;
|
import javax.validation.constraints.PositiveOrZero;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Entity
|
@Entity
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public interface BytesMessageSpecService {
|
public interface BytesMessageSpecService {
|
||||||
public BytesMessageSpec findActiveBytesMessageSpec();
|
public BytesMessageSpec findActiveBytesMessageSpec();
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.domain.Example;
|
import org.springframework.data.domain.Example;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -12,6 +8,10 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(propagation = Propagation.SUPPORTS)
|
@Transactional(propagation = Propagation.SUPPORTS)
|
||||||
public class BytesMessageSpecServiceImpl implements BytesMessageSpecService {
|
public class BytesMessageSpecServiceImpl implements BytesMessageSpecService {
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.persistence.*;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
|
||||||
import javax.persistence.Entity;
|
|
||||||
import javax.persistence.GeneratedValue;
|
|
||||||
import javax.persistence.GenerationType;
|
|
||||||
import javax.persistence.Id;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.PositiveOrZero;
|
import javax.validation.constraints.PositiveOrZero;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@Entity
|
@Entity
|
||||||
|
|||||||
@@ -1,21 +1,16 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import javax.annotation.PreDestroy;
|
import io.netty.bootstrap.ServerBootstrap;
|
||||||
import javax.persistence.NoResultException;
|
import io.netty.channel.*;
|
||||||
|
import io.netty.channel.nio.NioEventLoopGroup;
|
||||||
|
import io.netty.channel.socket.SocketChannel;
|
||||||
|
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import io.netty.bootstrap.ServerBootstrap;
|
import javax.annotation.PreDestroy;
|
||||||
import io.netty.channel.ChannelFuture;
|
import javax.persistence.NoResultException;
|
||||||
import io.netty.channel.ChannelInitializer;
|
|
||||||
import io.netty.channel.ChannelOption;
|
|
||||||
import io.netty.channel.ChannelPipeline;
|
|
||||||
import io.netty.channel.EventLoopGroup;
|
|
||||||
import io.netty.channel.nio.NioEventLoopGroup;
|
|
||||||
import io.netty.channel.socket.SocketChannel;
|
|
||||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class EchoSocketServer {
|
public class EchoSocketServer {
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.ByteBufUtil;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import io.netty.channel.ChannelHandler.Sharable;
|
import io.netty.channel.ChannelHandler.Sharable;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Sharable
|
@Sharable
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.ByteBufUtil;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.ReplayingDecoder;
|
import io.netty.handler.codec.ReplayingDecoder;
|
||||||
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class LengthHeaderFrameDecoder extends ReplayingDecoder<Void> {
|
public class LengthHeaderFrameDecoder extends ReplayingDecoder<Void> {
|
||||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
package com.eactive.httpmockserver.socket;
|
package com.eactive.httpmockserver.socket;
|
||||||
|
|
||||||
import java.util.Optional;
|
import com.eactive.httpmockserver.api.controller.ApiManageRestController;
|
||||||
|
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
||||||
import javax.annotation.PostConstruct;
|
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
||||||
import javax.annotation.PreDestroy;
|
|
||||||
import javax.persistence.NoResultException;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -19,16 +15,13 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import com.eactive.httpmockserver.ApiManageRestController;
|
import javax.annotation.PostConstruct;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesRequest;
|
import javax.annotation.PreDestroy;
|
||||||
import com.eactive.httpmockserver.datatables.DataTablesResponse;
|
import javax.persistence.NoResultException;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class SocketServerManageController {
|
public class SocketServerManageController {
|
||||||
|
|||||||
Reference in New Issue
Block a user