mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-29 18:38:32 +08:00
修复没有tomcat.json时报错的bug
This commit is contained in:
parent
d236987acb
commit
80f7d0e9bc
@ -24,7 +24,7 @@ public class LinuxTomcatCommander extends AbstractTomcatCommander {
|
||||
"-Dcatalina.base=\"%s\" " +
|
||||
"-Dcatalina.home=\"%s\" " +
|
||||
"-Djava.io.tmpdir=\"%stemp/\" " +
|
||||
"org.apache.catalina.startup.Bootstrap %s &", tomcatInfoModel.getPath(), tomcatInfoModel.getPath(),
|
||||
"org.apache.catalina.startup.Bootstrap %s", tomcatInfoModel.getPath(), tomcatInfoModel.getPath(),
|
||||
tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), tomcatInfoModel.getPath(),
|
||||
tomcatInfoModel.getPath(), tomcatInfoModel.getPath(), cmd);
|
||||
try {
|
||||
|
@ -103,7 +103,7 @@ public class TomcatManageController extends BaseAgentController {
|
||||
if (tomcatInfoModelTemp == null) {
|
||||
|
||||
if (StrUtil.isEmpty(tomcatInfoModel.getAppBase())) {
|
||||
tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat("webapps"));
|
||||
tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat(File.separator).concat("webapps"));
|
||||
} else {
|
||||
String path = FileUtil.normalize(tomcatInfoModel.getAppBase());
|
||||
if (FileUtil.isAbsolutePath(path)) {
|
||||
@ -184,7 +184,7 @@ public class TomcatManageController extends BaseAgentController {
|
||||
if (tomcatInfoModelTemp == null || tomcatInfoModelTemp.getId().equals(tomcatInfoModel.getId())) {
|
||||
|
||||
if (StrUtil.isEmpty(tomcatInfoModel.getAppBase())) {
|
||||
tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat("webapps"));
|
||||
tomcatInfoModel.setAppBase(FileUtil.normalize(tomcatInfoModel.getPath()).concat(File.separator).concat("webapps"));
|
||||
} else {
|
||||
String path = FileUtil.normalize(tomcatInfoModel.getAppBase());
|
||||
if (FileUtil.isAbsolutePath(path)) {
|
||||
|
@ -44,6 +44,10 @@ public class TomcatManageService extends BaseOperService<TomcatInfoModel> {
|
||||
public TomcatInfoModel getItemByName(String name) {
|
||||
JSONObject allTomcat = getJSONObject(AgentConfigBean.TOMCAT);
|
||||
|
||||
if (allTomcat == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
JSONObject tomcat = null;
|
||||
for (String key : allTomcat.keySet()) {
|
||||
JSONObject object = allTomcat.getJSONObject(key);
|
||||
|
Loading…
Reference in New Issue
Block a user