Fork me on GitHub

随笔分类 -  java

摘要:```java DefaultRedirectStrategy client.setRedirectHandler(new DefaultRedirectHandler() { @Override public boolean isRedirectRequested(Ht... 阅读全文
posted @ 2017-04-21 00:32 aloha_world 阅读(360) 评论(0) 推荐(0)
摘要:```java @EnableTransactionManagement // 开启注解事务管理,等同于xml配置文件中的 public class ProfiledemoApplication implements TransactionManagementConfigurer { @Resource(name="jpaTransactionManager") privat... 阅读全文
posted @ 2017-04-09 23:08 aloha_world 阅读(143) 评论(0) 推荐(0)
摘要:```java @SuppressWarnings({ "rawtypes", "unchecked" }) public static Map> getNodeAlarmInfoConfig(String filePath) { InputStream is = JsonTest.class.getResourceAsStream("/META-INF/test.json"); ... 阅读全文
posted @ 2017-02-17 21:17 aloha_world 阅读(161) 评论(0) 推荐(0)
摘要:自定义ThreadLocal 操作ThreadLocal的工具类 更一般的工具类 阅读全文
posted @ 2017-01-14 23:35 aloha_world 阅读(794) 评论(0) 推荐(0)
摘要:```java package rugal.sample.core.entity; import java.util.Date; import java.util.UUID; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; im... 阅读全文
posted @ 2017-01-14 23:26 aloha_world 阅读(142) 评论(0) 推荐(0)
摘要:```java package org.alohaworld.mactest; import java.util.Arrays; public class BuyBlockTest { /** * 面试题选出股票的买入和卖出时机,使盈利最大 * * @param args * 股票数据数组 * @return 买入时间点和卖出时间点,买入点时的点... 阅读全文
posted @ 2016-12-05 21:06 aloha_world 阅读(130) 评论(0) 推荐(0)
摘要:java中的路径 System.getProperty("user.dir") 获取工程的绝对路径 Class.class.getClass().getResource("/").getPath() 类的绝对路径 jsp中的路径 request.getRequestURI() 得到相对地址 requ 阅读全文
posted @ 2016-10-25 22:54 aloha_world 阅读(104) 评论(0) 推荐(0)