ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 配置 ![](https://box.kancloud.cn/80f740c298c27504340bd3c5c08f508a_2024x1416.png) ![](https://box.kancloud.cn/2515a9b5078c8819cae50f4522cdb841_2218x1416.png) 避免重复下载模板:-DarchetypeCatalog=local ![](https://box.kancloud.cn/2a3bca801a32945ddbec8a34b99a4afc_2248x1416.png) ## IDEA创建普通maven工程 ![](https://box.kancloud.cn/7143680fdc991268a6b166fa29c89a61_1692x1736.png) ![](https://box.kancloud.cn/077b26cdd405442c02e3e3aee24ed059_1692x1736.png) ![](https://box.kancloud.cn/f201d714e262fa9a483a1ccfc73fc0e3_1692x1736.png) ## IDEA创建WEB maven工程 ![](https://box.kancloud.cn/98a832234df93b54c9bb1c2489e2f2d1_1692x1736.png) pom.xml: 加入依赖,maven会自动下载.添加的依赖可以去maven官网搜. ~~~ <?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- $Id: pom.xml 642118 2008-03-28 08:04:16Z reinhard $ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>war</packaging> <name>maven_web</name> <groupId>com.like</groupId> <artifactId>maven_web</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> </plugin> </plugins> </build> </project> ~~~ 运行tomcat: ![](https://box.kancloud.cn/ddb4e73ca11136905f36e2f159ebb759_1490x302.png)