프로퍼티 읽기 수정

master
mjkhan21 1 year ago
parent 40aa003830
commit 4c724b2a6c

@ -46,7 +46,7 @@ public class Property extends AbstractComponent {
* @param name
* @return
*/
public static String read(Object obj, String name) {
public static Object read(Object obj, String name) {
return get().get(obj, name);
}
@ -100,8 +100,10 @@ public class Property extends AbstractComponent {
* @param name
* @return
*/
public String get(Object obj, String name) {
public Object get(Object obj, String name) {
try {
String str = BeanUtils.getIndexedProperty(obj, name);
System.out.println(str);
return BeanUtils.getProperty(obj, name);
} catch (Exception e) {
throw runtimeException(e);
@ -109,8 +111,9 @@ public class Property extends AbstractComponent {
}
public Object getValue(Object obj, String name) {
return get(obj, name);
/*
if (name.contains("."))
return get(obj, name);
try {
return getDescriptor(obj, name)
.getReadMethod()
@ -118,7 +121,6 @@ public class Property extends AbstractComponent {
} catch (Exception e) {
throw runtimeException(e);
}
*/
}
/** .

Loading…
Cancel
Save