Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/thinkgem/jeesite
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Jan 3, 2017
2 parents 1cf2650 + a9f1524 commit a701abf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
public static void annotationToObject(Object annotation, Object object){
if (annotation != null){
Class<?> annotationClass = annotation.getClass();
if (null == object) {
return;
}
Class<?> objectClass = object.getClass();
for (Method m : objectClass.getMethods()){
if (StringUtils.startsWith(m.getName(), "set")){
try {
String s = StringUtils.uncapitalize(StringUtils.substring(m.getName(), 3));
Object obj = annotationClass.getMethod(s).invoke(annotation);
if (obj != null && !"".equals(obj.toString())){
if (object == null){
object = objectClass.newInstance();
}
m.invoke(object, obj);
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public String deploy(String exportDir, String category, MultipartFile file) {

try {
InputStream fileInputStream = file.getInputStream();
Deployment deployment = null;
Deployment deployment;
String extension = FilenameUtils.getExtension(fileName);
if (extension.equals("zip") || extension.equals("bar")) {
ZipInputStream zip = new ZipInputStream(fileInputStream);
Expand All @@ -152,6 +152,7 @@ public String deploy(String exportDir, String category, MultipartFile file) {
deployment = repositoryService.createDeployment().addInputStream(baseName + ".bpmn20.xml", fileInputStream).deploy();
} else {
message = "不支持的文件类型:" + extension;
return message;
}

List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
Expand Down

0 comments on commit a701abf

Please sign in to comment.