指定
appoint; assign; allocate; appointment; destine; designation; assigning:
(通过法律手续)指定把财产授与某人
settle one's property on sb.;
指定某人任某职
designate sb. to an office;
指定某人做某事
assign sb. to do sth.;
指定一个日期
appoint a date
执行
执行命令
execute an order;
执行任务
carry out a task
int 与 Integer
非new生成的Integer变量指向的是java常量池中的对象,而new Integer()生成的变量指向堆中新建的对象,两者在内存中的地址不同。所以 输出为false。
@RequestBody(required=false) 表示map对象可以不传入
public ResponseBodyVO<Integer> approveDisagreeDo(@RequestBody(required=false) Map<String, Object> map) throws BusinessException {
/*
* 1.审批的操作:调用审批接口的操作
* 2.工作流的操作:把运行表中的审批人ID置为空
*
* approverAction:1:驳回 2:驳回并修改
*/
Integer approverAction = (Integer)map.get("approverAction");
String approvalStatus = null;
switch (approverAction) {
case 1:
approvalStatus="驳回";
break;
case 2:
approvalStatus="驳回并修改";
break;
}
approveBusiService.approveDo(map, approverAction);
logger.debug("组装更新运行表的map");
Map<String, Object> uMap = new HashMap<String,Object>();
uMap.put("applyId", map.get("applyId"));
uMap.put("curUserID", "");
uMap.put("approvalStatus",approvalStatus);
uMap.put("invariantField", "applyId");
rows=workflowApplyRunningService.updateMap(uMap);
ResponseBodyVO<Integer> responseBodyVO=new ResponseBodyVO<>();
responseBodyVO.setSuccessResult(rows);
return responseBodyVO;
}
Spring boot启动默认是要加载数据源,因此在 model 层出现问题的话,程序启动异常
Spring Boot 配置 mybatis
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.0</version>
</dependency>
Spring Boot
启动文件
Spring 注解
package com.boxin.productions.stp.ttc;
import com.boxin.productions.sss.common.component.BaseComponent;
import com.boxin.productions.sss.common.component.interceptor.RequestInterceptor;
import com.boxin.productions.sss.common.jpa.service.SysUserService;
//import com.boxin.productions.sss.common.jpa.service.TicketsPropCategoryService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
@Configuration
@SpringBootApplication
@EnableAspectJAutoProxy
@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class, MongoDataAutoConfiguration.class })
@EnableScheduling
//@EnableFeignClients
//@EnableDiscoveryClient
@ComponentScan(basePackageClasses = { boxinApplication.class, BaseComponent.class, SysUserService.class, RequestInterceptor.class})
public class boxinApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(boxinApplication.class);
}
public static void main(String[] args) throws Exception {
SpringApplication app = new SpringApplication(boxinApplication.class);
app.run(args);
}
}
Springboot 装载mybatis
MyBatis注解应用之动态SQL语句
@DeleteProvider(type = DynamicSqlProvider.class, method = "deleteListByIds")