我是靠谱客的博主 繁荣电源,这篇文章主要介绍idea设置tomcat7插件,现在分享给大家,希望可以做个参考。

首先在 pom.xml 下加入以下代码:

复制代码
1
2
3
4
5
6
7
8
9
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <port>8080</port> <path>/cloudlibrary</path> </configuration> </plugin>

<path></path>这里面的东西是自己的地址

打开配置

点击添加新的配置

在 Command line 中加入 tomcat7:run

 点击 runner

 把 Use Project Settings 的勾选去掉

在 VM Options 中写入 -DarchetypeCatalog=internal

把 JRE 改成 1.8

 点击 Apply 点击 OK

再在 resource 目录下添加一个叫 log4j2.xml 的配置文件

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0" encoding="UTF-8"?> <Configuration status="WARN"> <Appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="%d{YYYY-MM-dd HH:mm:ss} [%t] %-5p %c{1}:%L - %msg%n" /> </Console> <RollingFile name="RollingFile" filename="log/test.log" filepattern="${logPath}/%d{YYYYMMddHHmmss}-fargo.log"> <PatternLayout pattern="%d{YYYY-MM-dd HH:mm:ss} [%t] %-5p %c{1}:%L - %msg%n" /> <Policies> <SizeBasedTriggeringPolicy size="10 MB" /> </Policies> <DefaultRolloverStrategy max="20" /> </RollingFile> </Appenders> <Loggers> <Root level="info"> <AppenderRef ref="Console" /> <AppenderRef ref="RollingFile" /> </Root> </Loggers> </Configuration>

就配置好了

最后

以上就是繁荣电源最近收集整理的关于idea设置tomcat7插件的全部内容,更多相关idea设置tomcat7插件内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部