Commit 6083ac6d by s_guodong

整合Jersey

parent cc45a34b
......@@ -76,6 +76,10 @@
<artifactId>commons-compress</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance</groupId>
<artifactId>jrxx-bean</artifactId>
<version>0.0.1</version>
......
package com.ceb.gjjs.mda.config;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.stereotype.Component;
import javax.ws.rs.ApplicationPath;
/**
* @Description
* @Author s_guodong
* @Date 2023/6/20
*/
@Component
@ApplicationPath("/gjjs/business")
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
packages("com.ceb.gjjs.mda.resource");
}
}
......@@ -3,10 +3,12 @@ package com.ceb.gjjs.mda.resource;
import com.brilliance.mda.runtime.request.BaseVO;
import com.brilliance.mda.runtime.response.ResponseSet;
import com.ceb.gjjs.mda.service.ICommonService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
/**
* @author wangguangchao
* @create 2021-09-24 11:51
......@@ -15,65 +17,73 @@ public abstract class AbstractCommonResource<V extends BaseVO> {
protected abstract ICommonService getCommonService();
@PostMapping("/init")
@Path("/init")
@POST
public ResponseSet<V> init(@RequestBody V req) {
return getCommonService().init(req);
}
@PostMapping("/checkAll")
@Path("/checkAll")
@POST
public ResponseSet checkAll(@RequestBody V req) {
return getCommonService().checkAll(req);
}
@PostMapping("/saveData")
public ResponseSet<V> saveData(@RequestBody V req) {
@Path("/saveData")
@POST
public ResponseSet<V> saveData(@RequestBody V req) {
return getCommonService().saveData(req);
}
@PostMapping("/confirmData")
@Path("/confirmData")
@POST
public ResponseSet<V> confirmData(@RequestBody V req) {
return getCommonService().confirmData(req);
}
@PostMapping("/pending")
@Path("/pending")
@POST
public ResponseSet<V> pending(@RequestBody V req) {
return getCommonService().pending(req);
}
@PostMapping("/executeCheck/{rule}")
public ResponseSet<V> executeCheck(@PathVariable("rule") String rule, @RequestBody V req) {
@Path("/executeCheck/{rule}")
@POST
public ResponseSet<V> executeCheck(@PathParam("rule") String rule, @RequestBody V req) {
String[] ruleArr = rule.split(",");
return getCommonService().executeCheck(req,ruleArr);
return getCommonService().executeCheck(req, ruleArr);
}
@PostMapping("/executeRule/{rule}")
public ResponseSet<V> executeRule(@PathVariable("rule") String rule,@RequestBody V req) {
@Path("/executeRule/{rule}")
@POST
public ResponseSet<V> executeRule(@PathParam("rule") String rule, @RequestBody V req) {
String[] ruleArr = rule.split(",");
ResponseSet<V> res = getCommonService().executeRule(req,ruleArr);
ResponseSet<V> res = getCommonService().executeRule(req, ruleArr);
return res;
}
@PostMapping("/executeDefault/{rule}")
public ResponseSet<V> executeDefault(@PathVariable("rule") String rule,@RequestBody V req) {
@Path("/executeDefault/{rule}")
@POST
public ResponseSet<V> executeDefault(@PathParam("rule") String rule, @RequestBody V req) {
String[] ruleArr = rule.split(",");
return getCommonService().executeDefault(req,ruleArr);
return getCommonService().executeDefault(req, ruleArr);
}
@PostMapping("/executeNotify")
@Path("/executeNotify")
@POST
public ResponseSet<V> executeNotify(@RequestBody V req) {
return getCommonService().executeNotify(req);
}
@PostMapping("/executeDocpan")
@Path("/executeDocpan")
@POST
public ResponseSet<V> executeDocpan(@RequestBody V req) {
return getCommonService().executeDocpan(req);
}
@PostMapping("/executeDocpanDetail")
@Path("/executeDocpanDetail")
@POST
public ResponseSet<V> executeDocpanDetail(@RequestBody V req) {
return getCommonService().executeDocpanDetail(req);
}
......
server:
port: 8088
servlet:
context-path: /gjjs/business
#context-path: /gjjs/business
servlet-path : /gjjs/business
spring:
ipsnew:
driver-class-name: oracle.jdbc.driver.OracleDriver
......
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