Eclipse Maven spring-mvc


1.创建Maven Web项目,Archetype选择 archetype-maven-webapp

2.添加spring-mvc依赖

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>4.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId...

阅读全文...

Eclipse Maven Servlet freemarker


1.创建Maven Web项目,Archetype选择 archetype-maven-webapp

2.添加Servlet依赖

<dependency >
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>4.0.1</version>
</dependency>

3.添加freemarker依赖

<dependency>
    &l...

阅读全文...

org.apache.maven.archiver.MavenArchiver.getManifest


使用https://start.spring.io/创建的项目,使用Eclipse导入会有错误:

org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject, org.apache.maven.archiver.MavenArchiveConfiguration)

解决办法:升级Eclipse Maven插件

1、点击help->install new software

2、出现下面弹窗后点击Add

3、输入:http://repo1.maven.org/mave...

阅读全文...

Eclipse Maven mybatis MySQL


1.创建Maven项目,选择Archetype为archetype-maven-quickstart

2.添加mysql依赖

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.6</version>
</dependency>

注意:版本太低会有问题,这里使用5.1.6测试通过

3.mybatis依赖

<dependen...

阅读全文...

Eclipse Maven MySQL Hibernate


1.创建Maven项目,选择Archetype为archetype-maven-quickstart

2.添加mysql依赖

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.0.2</version>
</dependency>

注意:版本对应

3.添加Hibernate依赖

<dependency>
    <...

阅读全文...

Eclipse Maven Tomcat Struts2


1.创建Maven项目,Archetype 选择archetype-maven-webapp

2.修改JRE build path.

3.添加Servlet依赖

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>4.0.1</version>
</dependency>

4.添加属性版本

<properties>...

阅读全文...

Maven jdbc mysql 依赖


<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>5.0.2</version>
</dependency>
package com.codingdict.test;

// for standard JDBC programs
import java.sql.Connection;
import java.sql.DriverManager;
...

阅读全文...

Eclipse Maven创建 web项目


1.创建Maven项目

2.选择Maven-archetype-webapp

3.打开https://search.maven.org 搜索 javax.servlet-api

4.打开pom.xml添加servlet依赖

<dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.1.0</version>
</dependency>

5....

阅读全文...