/** * <p>Return the entire set of properties for which the specified bean * provides a read method.</p> * * <p>For more details see <code>BeanUtilsBean</code>.</p> * * @param bean Bean whose properties are to be extracted * @return Map of property descriptors * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * property cannot be found * @see BeanUtilsBean#describe */ public static Map<String, String> describe(final Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return BeanUtilsBean.getInstance().describe(bean); }
/** * <p>Return the entire set of properties for which the specified bean * provides a read method.</p> * * <p>For more details see <code>BeanUtilsBean</code>.</p> * * @param bean Bean whose properties are to be extracted * @return Map of property descriptors * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * property cannot be found * @see BeanUtilsBean#describe */ public static Map<String, String> describe(final Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return BeanUtilsBean.getInstance().describe(bean); }
/** * <p>Return the entire set of properties for which the specified bean * provides a read method.</p> * * <p>For more details see <code>BeanUtilsBean</code>.</p> * * @param bean Bean whose properties are to be extracted * @return Map of property descriptors * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * property cannot be found * @see BeanUtilsBean#describe */ public static Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return BeanUtilsBean.getInstance().describe(bean); }
/** * <p>Return the entire set of properties for which the specified bean * provides a read method.</p> * * <p>For more details see <code>BeanUtilsBean</code>.</p> * * @param bean Bean whose properties are to be extracted * @return Map of property descriptors * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * property cannot be found * @see BeanUtilsBean#describe */ public static Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return BeanUtilsBean.getInstance().describe(bean); }
/** * <p>Return the entire set of properties for which the specified bean * provides a read method.</p> * * <p>For more details see <code>BeanUtilsBean</code>.</p> * * @param bean Bean whose properties are to be extracted * @return Map of property descriptors * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * property cannot be found * @see BeanUtilsBean#describe */ public static Map describe(Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return BeanUtilsBean.getInstance().describe(bean); }
/** * <p>Return the entire set of properties for which the specified bean * provides a read method.</p> * * <p>For more details see <code>BeanUtilsBean</code>.</p> * * @param bean Bean whose properties are to be extracted * @return Map of property descriptors * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * property cannot be found * @see BeanUtilsBean#describe */ public static Map<String, String> describe(final Object bean) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return BeanUtilsBean.getInstance().describe(bean); }
try { @SuppressWarnings("unchecked") Map<String, Object> description = BeanUtilsBean2.getInstance().describe(container); for (String o : description.keySet()) { Object object = description.get(o);
/** * 生成Token * @param username 用户账号 * @param password 密码 * @return 加密串 */ public String jwtToken(String username, String password) { Authority authority = this.jwtiFace.getAuthority(username, password); Preconditions.checkArgument(null != authority, "用户名或密码错误"); try { Map<String, String> beanMap = BeanUtilsBean2.getInstance().describe(authority); String token = JWTUtils.jwtToken(ImmutableMap.copyOf(beanMap), jjwtConfigure.getPrivateKey(), jjwtConfigure.getExpire()); log.info("username:{}, token:{}", username, token); //WebUtils.setCookie(WebUtils.getHttpServletResponse(), jjwtConfigure.getDomain(), jjwtConfigure.getCookieName(), token, jjwtConfigure.getCookieMaxAge()); return token; } catch (Exception e) { throw new RuntimeException("生成签名失败"); } }
try { @SuppressWarnings("unchecked") Map<String, Object> description = BeanUtilsBean2.getInstance().describe(container); for (String o : description.keySet()) { Object object = description.get(o);