| | |
| | | import com.lf.server.entity.all.StaticData; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.apache.http.client.entity.UrlEncodedFormEntity; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | import java.net.URL; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取static目录 |
| | | */ |
| | | public static String getStaticPath() { |
| | | ClassLoader classLoader = PathHelper.class.getClassLoader(); |
| | | URL url = classLoader.getResource(""); |
| | | String path = url.getPath(); |
| | | |
| | | return path.substring(0, path.indexOf("/target/classes")) + "/src/main/resources/static/"; |
| | | } |
| | | } |