问题解决:ideaj社区版添加tomcat

用了破解的商业版,启动时变成了社区版

  解决方法,启动exe为idea64.exe

 

没有tomcat了,手动添加 (http://blog.csdn.net/u010666884/article/details/52119491)

由于IDEA社区版(Community)无法直接New一个Web Appplication 所以要使用maven来创建

1.创建一个Project

2.

3.

4.这里在Properties中添加一个参数archetypeCatalog=internal,不加这个参数,在maven生成骨架的时候将会非常慢,有时候会直接卡住。

 

来自网上的解释:

archetypeCatalog表示插件使用的archetype元数据,不加这个参数时默认为remote,local,即中央仓库archetype元数据,由于中央仓库的archetype太多了,所以导致很慢,指定internal来表示仅使用内部元数据。

5.

6.配置Tomcat

7.点击左上角的加号,选择Maven

8.

9.先在pom.xml中加入tomcat7的插件(注意我在其中的port标签里设置了端口号是9090)

 

<build>  
    <finalName>TestArtif</finalName>  
    <plugins>  
      <plugin>  
        <groupId>org.apache.tomcat.maven</groupId>  
        <artifactId>tomcat7-maven-plugin</artifactId>  
        <version>2.1</version>  
        <configuration>  
          <port>9090</port>  
          <path>/</path>  
          <uriEncoding>UTF-8</uriEncoding>  
          <server>tomcat7</server>  
        </configuration>  
      </plugin>  
    </plugins>  
 </build>  

  

 

然后点击右上角的绿色三角形箭头,等待tomcat启动,可以在下方看到tomcat的启动信息。(如果是第一次启动,可能要等待从Maven仓库下载插件)

就会再控制台中看到如下信息:

 

八月 04, 2016 3:08:30 下午 org.apache.coyote.AbstractProtocol init  
信息: Initializing ProtocolHandler ["http-bio-8080"]  
八月 04, 2016 3:08:30 下午 org.apache.catalina.core.StandardService startInternal  
信息: Starting service Tomcat  
八月 04, 2016 3:08:30 下午 org.apache.catalina.core.StandardEngine startInternal  
信息: Starting Servlet Engine: Apache Tomcat/7.0.37  
八月 04, 2016 3:08:32 下午 org.apache.coyote.AbstractProtocol start  
信息: Starting ProtocolHandler ["http-bio-8080"]  

  

 

 

posted @ 2018-05-25 17:12  头鹰在学习  阅读(9771)  评论(0编辑  收藏  举报