Skip to content

Commit

Permalink
migrate app and fine tune receipe edit
Browse files Browse the repository at this point in the history
  • Loading branch information
ntut-ben committed Nov 11, 2019
1 parent ab0b0c8 commit a53ad0b
Show file tree
Hide file tree
Showing 284 changed files with 1,465 additions and 849 deletions.
9 changes: 4 additions & 5 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Expand Down
26 changes: 18 additions & 8 deletions .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -1,54 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">









<wb-module deploy-name="git_ezfit-0.0.1-SNAPSHOT">

<wb-module deploy-name="ezfit-0.0.1-SNAPSHOT">








<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>









<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>









<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>

<wb-resource deploy-path="/WEB-INF/classes" source-path="/resource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>








<property name="java-output-path" value="/ezfit/target/classes"/>

<property name="context-root" value="ezfit"/>









</wb-module>






Expand Down
9 changes: 6 additions & 3 deletions src/main/java/Recipe/controller/recipeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ public String writeRecipeServlet(HttpServletRequest request) {
} else {
oldFileName = rs.getRecipeByRecipeId(value).getFileName();
oldMethod = methodService.selectMethodById(value).getFileName();
recipe.setRecipeId(Integer.valueOf(value));
// recipe.setRecipeId(Integer.valueOf(value));
recipe = rs.getRecipeByRecipeId(value);
methodList = methodService.showMethod(value);
methodLength = methodList.size();
killed = methodLength;
Expand Down Expand Up @@ -745,11 +746,13 @@ public String doUpload(FileItem item, String fileName) {
fileName = (fileName + formatName).toLowerCase();
System.out.println("上傳檔案檔案名稱:" + fileName);
// =====test=====
System.out.println("target:" + def_upload_dir + "\\" + fileName);
System.out.println("target:" + def_upload_dir + "/" + fileName);
// ==============
File uploadedFile = new File(def_upload_dir + "\\" + fileName);
File uploadedFile = new File(def_upload_dir + "/" + fileName);
// 會產生 Exception
try {
if(uploadedFile.exists())
uploadedFile.delete();
item.write(uploadedFile);
str = fileName;
} catch (Exception e) {
Expand Down
Loading

0 comments on commit a53ad0b

Please sign in to comment.