浏览代码

修改了webservice访问权限限制

verguenza 4 年之前
父节点
当前提交
6cc1947896

+ 1 - 0
src/main/java/com/galaxis/manatee/configuration/ManateeSecurity.java

@@ -41,6 +41,7 @@ public class ManateeSecurity extends WebSecurityConfigurerAdapter {
                 .antMatchers(HttpMethod.GET,GO_CONFIRM).permitAll()
                 .antMatchers(HttpMethod.GET,"/test/**").permitAll()
                 .antMatchers(HttpMethod.GET,"/ws/**").permitAll()
+                .antMatchers(HttpMethod.POST,"/ws/**").permitAll()
                 .anyRequest().authenticated()
                 .and()
                 .addFilter(new JwtAuthenticationFilter(authenticationManager()))

+ 17 - 12
src/main/java/com/galaxis/manatee/webservice/CountryEndpoint.java

@@ -1,10 +1,7 @@
 package com.galaxis.manatee.webservice;
 
 
-import com.galaxis.manatee.chuanyun_web_service.GetList;
-import com.galaxis.manatee.chuanyun_web_service.GetSchema;
-import com.galaxis.manatee.chuanyun_web_service.GetSchemaList;
-import com.galaxis.manatee.chuanyun_web_service.Invoke;
+import com.galaxis.manatee.chuanyun_web_service.*;
 import org.springframework.ws.server.endpoint.annotation.Endpoint;
 import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
 import org.springframework.ws.server.endpoint.annotation.RequestPayload;
@@ -20,22 +17,28 @@ public class CountryEndpoint {
 
 	@PayloadRoot(namespace = NAMESPACE_URI, localPart = "GetSchema")
 	@ResponsePayload
-	public String getSchema(@RequestPayload GetSchema request)
+	public GetSchemaResponse getSchema(@RequestPayload GetSchema request)
 	{
-		return "";
+		GetSchemaResponse getSchemaResponse=new GetSchemaResponse();
+		getSchemaResponse.setResponse("{}");
+		return getSchemaResponse;
 	}
 
 	@PayloadRoot(namespace = NAMESPACE_URI, localPart = "GetSchemaList")
 	@ResponsePayload
-	public String getSchemaList(@RequestPayload GetSchemaList request)
+	public GetSchemaListResponse getSchemaList(@RequestPayload GetSchemaList request)
 	{
-		return "";
+		GetSchemaListResponse getSchemaListResponse=new GetSchemaListResponse();
+		getSchemaListResponse.setResponse("{}");
+		return getSchemaListResponse;
 	}
 
 	@PayloadRoot(namespace = NAMESPACE_URI, localPart = "GetList")
 	@ResponsePayload
-	public String getList(@RequestPayload GetList request) {
-		return "";
+	public GetListResponse getList(@RequestPayload GetList request) {
+		GetListResponse getListResponse=new GetListResponse();
+		getListResponse.setResponse("{}");
+		return getListResponse;
 	}
 
 	/**
@@ -43,8 +46,10 @@ public class CountryEndpoint {
 	 */
 	@PayloadRoot(namespace = NAMESPACE_URI, localPart = "Invoke")
 	@ResponsePayload
-	public String invoke(@RequestPayload Invoke request) {
+	public InvokeResponse invoke(@RequestPayload Invoke request) {
         //书写调用第三方接口方法
-		return "";
+		InvokeResponse invokeResponse=new InvokeResponse();
+		invokeResponse.setResponse("{}");
+		return invokeResponse;
 	}
 }