|
|
@@ -33,6 +33,9 @@ import javax.swing.JTextArea;
|
|
|
import javax.swing.JTextField;
|
|
|
import javax.swing.Timer;
|
|
|
|
|
|
+import org.apache.commons.logging.Log;
|
|
|
+import org.apache.commons.logging.LogFactory;
|
|
|
+import org.leanwo.management.exception.ConfigFileException;
|
|
|
import org.leanwo.management.util.SpringUtil;
|
|
|
import org.leanwo.management.util.XmlConfigPathService;
|
|
|
|
|
|
@@ -45,6 +48,9 @@ import com.leanwo.management.model.XmlConfigPath;
|
|
|
*
|
|
|
*/
|
|
|
public class ServerSettingJFrame extends JFrame{
|
|
|
+
|
|
|
+ private static Log logger = LogFactory.getLog(ServerSettingJFrame.class);
|
|
|
+
|
|
|
private ApplicationSetting applicationSetting;
|
|
|
private XmlConfigPath xmlConfigPath;
|
|
|
private XmlConfigPathService xmlConfigPathService;
|
|
|
@@ -69,7 +75,15 @@ public class ServerSettingJFrame extends JFrame{
|
|
|
|
|
|
this.xmlConfigPathService = (XmlConfigPathService) SpringUtil.getSingleBean(XmlConfigPathService.class);
|
|
|
this.applicationSetting = applicationSetting;
|
|
|
- this.xmlConfigPathService.load(applicationSetting);
|
|
|
+
|
|
|
+ try {
|
|
|
+ this.xmlConfigPathService.load(applicationSetting);
|
|
|
+ }catch(ConfigFileException ex) {
|
|
|
+ logger.error("配置文件异常", ex);
|
|
|
+ JOptionPane.showMessageDialog(null, ex.getMessage(), "配置文件异常", JOptionPane.ERROR_MESSAGE);
|
|
|
+ this.dispose();
|
|
|
+ }
|
|
|
+
|
|
|
this.xmlConfigPath = applicationSetting.getXmlConfigPath();
|
|
|
this.innerPanel = new JPanel(new GridBagLayout());
|
|
|
|