Commit 93f8aa8d by 王厚康

接口完善

parent 9610ce64
......@@ -30,15 +30,15 @@ public class SwaggerConfig {
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("springboot利用swagger构建api文档")
.description("简单优雅的restfun风格,http://blog.csdn.net/saytime")
.termsOfServiceUrl("http://blog.csdn.net/saytime")
.title("业务流程管理(BPM)接口API文档")
.description("API接口文档结合组织架构模块和流程图模块,即可实现可视化流程管理和公司业务管理")
.version("1.0")
.build();
}
/**
* @ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页数1开始", dataType = "int",paramType = "query"),
......
......@@ -37,13 +37,16 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception { //配置策略
http.csrf().disable();
http.authorizeRequests().
antMatchers("/static/**").permitAll().anyRequest().authenticated().
antMatchers("/v2/api-docs","/swagger-resources/**","/webjars/**").permitAll().anyRequest().authenticated().
and().formLogin().loginPage("/login").permitAll().successHandler(loginSuccessHandler()).
and().logout().permitAll().invalidateHttpSession(true).
deleteCookies("JSESSIONID").logoutSuccessHandler(logoutSuccessHandler()).
and().sessionManagement().maximumSessions(10).expiredUrl("/login");
}
@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(userDetailsService()).passwordEncoder(passwordEncoder());
......
......@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
* Created by houkang on 2019/1/3.
*/
@RestController
@RequestMapping(value = "/bpm", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/bpm", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = {"Asmin Controller"})
public class AsminController {
private static final Logger Log = LoggerFactory.getLogger(AsminController.class);
......
......@@ -22,7 +22,7 @@ import java.util.List;
* Created by houkang on 2019/1/28.
*/
@RestController
@RequestMapping(value = "/bpm/userTask", produces = MediaType.APPLICATION_JSON_VALUE)
@RequestMapping(value = "/api/bpm/userTask", produces = MediaType.APPLICATION_JSON_VALUE)
@Api(tags = {"task Controller"})
public class UserTaskController {
......
......@@ -33,7 +33,7 @@ import java.util.Map;
* Created by houkang on 2019/2/22.
*/
@RestController
@RequestMapping("/bpm/model")
@RequestMapping("/api/bpm/model")
@Api(tags = {"流程管理"})
public class DeploymentController {
private static final Logger Log = LoggerFactory.getLogger(DeploymentController.class);
......
......@@ -21,10 +21,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
......@@ -33,7 +30,7 @@ import java.util.List;
* Created by houkang on 2019/2/27.
*/
@RestController
@RequestMapping("/bpm/history")
@RequestMapping("/api/bpm/history")
@Api(tags = {"历史任务管理"})
public class TaskHistoryController {
private static final Logger Log = LoggerFactory.getLogger(TaskHistoryController.class);
......@@ -90,7 +87,7 @@ public class TaskHistoryController {
}
@ApiOperation(value = "查询已办理任务")
@GetMapping("/completedTaskList")
@PostMapping("/completedTaskList")
public BpmResponse completedTaskList( @RequestBody PendingTaskListRequest req) {
BpmResponse resp = new BpmResponse();
try{
......
......@@ -29,7 +29,7 @@ import java.util.Map;
* Created by houkang on 2019/2/27.
*/
@RestController
@RequestMapping("/bpm/task")
@RequestMapping("/api/bpm/task")
@Api(tags = {"任务管理"})
public class TaskOperateController {
private static final Logger Log = LoggerFactory.getLogger(TaskOperateController.class);
......@@ -107,7 +107,7 @@ public class TaskOperateController {
@ApiOperation(value = "查询待处理任务")
@GetMapping("/pendingTaskList")
@PostMapping("/pendingTaskList")
public BpmResponse pendingTaskList( @RequestBody PendingTaskListRequest req) {
BpmResponse resp = new BpmResponse();
try{
......
......@@ -37,10 +37,10 @@
<!--左边导航-->
<div class="main_wrap clearfix" >
<ul id="aside_nav" class="navBox" style='width:125px;min-height: 680px;'>
<li class="s_menu_item"><a target="main_frame" href="">查看流程</a></li>
<li class="s_menu_item"><a target="main_frame" href="/model/createNew">创建流程</a></li>
<li class="s_menu_item"><a target="main_frame" href="/model/createNew">组织结构</a></li>
<li class="s_menu_item"><a target="main_frame" href="/model/createNew">API</a></li>
<li class="s_menu_item"><a target="main_frame" href="">查看流程</a></li>
<li class="s_menu_item"><a th:href="@{/model/createNew}">创建流程</a></li>
<li class="s_menu_item"><a href="/model/createNew">组织结构</a></li>
<li class="s_menu_item"><a th:href="@{/swagger-ui.html}">API</a></li>
</ul>
......
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