随笔分类 - java
摘要:File source = new File("视频.mp4"); Encoder encoder = new Encoder(); try { MultimediaInfo info = encoder.getInfo(source); System.out.println("dura="+inf
阅读全文
摘要:src目录或src同级的其他目录(比如conf)下创建 beetl.properties文件,文件内容如下 (maven项目)在resources目录下创建 RESOURCE_LOADER=org.beetl.core.resource.WebAppResourceLoader RESOURCE.r
阅读全文
摘要:1 com.my.Ob; 2 @Table(name="ob") 3 class Ob{ 4 @Id 5 private Integer id; 6 @Column(name="name1") 7 private String name; 8 private String pass; 9 10 pu
阅读全文
摘要:-moz-border-radius: 15px; /* Gecko browsers */ -webkit-border-radius: 15px; /* Webkit browsers */ border-radius:15px; /* W3C syntax */ 支持上、右、下、左 borde
阅读全文
摘要:获取数据时需要进行转码 item.getString("网站使用编码utf-8,GBK等"); public class FileUpLoad extends HttpServlet { public void doPost(HttpServletRequest request, HttpServl
阅读全文
摘要:FileWriter writer = null; String fileName="d://my.txt"; String line="要追加的内容"; try { // 打开一个写文件器,构造函数中的第二个参数true表示以追加形式写文件 ,false 表示覆盖原内容 writer = new
阅读全文
摘要:String path="D://my"; File folder=new File(path); if(!folder.exists() && !folder.isDirectory()){ //文件夾不存在時创建文件夾 folder.mkdirs(); } String fileName="D:
阅读全文
摘要:URL url = new URL("网关url");//使用post方式,这里不要带参数 HttpURLConnection httpCon = (HttpURLConnection) url.openConnection(); httpCon.setConnectTimeout(5 * 1000
阅读全文
摘要:ShiroUser user = (ShiroUser) SecurityUtils.getSubject().getPrincipal(); user.name = newName;
阅读全文