Authored by BuddyJack

Fix

package com.example.demo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by jack on 2018/4/18.
*/
@RestController
public class ShowCtrl {
@Autowired
ShowSer showSer;
@GetMapping
public void fixPhotoDir(@RequestParam String curDir) {
showSer.fixCurrentDir(curDir);
}
}
... ...
package com.example.demo;
import org.springframework.stereotype.Service;
/**
* Created by jack on 2018/4/18.
*/
@Service
public class ShowSer {
private String currentDir;
public void fixCurrentDir(String currentDir) {
this.currentDir = currentDir;
}
}
... ...