Coder Social home page Coder Social logo

panhainan / foweb Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 2.0 667 KB

一个基于 Spring+SpringMVC+Mybatis 的Maven多模块项目结构demo。(这是实现前后端分离的服务器端,客服端查看foweb.client)。**内部查看请移步右侧开源**码云gitosc,访问速度明显提升。

Home Page: https://git.oschina.net/phn/foweb

License: GNU General Public License v3.0

Java 99.20% HTML 0.80%

foweb's Introduction

Foweb Framework

A multi-modules maven project base on Spring+SpringMVC+Mybatis.

一个基于 Spring+SpringMVC+Mybatis 的Maven多模块项目。

使用文档

两种使用方式:

1. 直接将项目download下来,然后在IDE(Eclipse或者IDEA)中以maven项目导入,注意这是多模块的maven项目。

#####2. 将项目的原型安装在本地,以后可以直接创建以该项目为原型的项目。

这里第一种方式不做介绍,主要介绍第二种方式以及在IDE(Eclipse或者IDEA)中如何创建。


将原型部署到本地Maven仓库

将项目目录下的archetype.zip下载下来,然后在本地解压;

进入到根目录下面,会看到src文件夹和pom.xml文件,然后在此处打开cmd,运行mvn deploy命令,然后maven会将其部署到本地仓库中。

注意,这里需要安装配置nexus( Maven仓库管理器 ),如果已经有了nexus,则还需要在maven的配置文件(即conf/settings.xml)中配置访问nexus的权限。找到settings.xml中的servers元素,然后在元素中间添加以下代码:

 <server>

     <id>releases</id>

     <username>admin</username>

     <password>admin123</password>

 </server>

 <server>

     <id>snapshots</id>

     <username>admin</username>

     <password>admin123</password>

 </server>

nexus安装可以参考: http://www.blogjava.net/fancydeepin/archive/2015/06/27/maven-nexus.html

然后在重新使用mvc deploy命令执行就会提示build success

剩下的工作便是将这个archetype弄到你的IDE中,这里介绍IDE有两个EclipseIDEA,当然首先得肯定你的IDE需要把maven配置好。

Eclipse配置Maven本地原型

对于Eclipse,打开配置界面,菜单栏Windows=> Preferences=> Maven=> Archetypes=> Add Remote Catalog...

在输入框中输入:

Catalog File : http://localhost:8081/nexus/content/groups/public/archetype-catalog.xml

Description : Foweb Framework - a multi-modules maven project base on Spring+SpringMVC+Mybatis.

注意:

Catalog file的地址和端口为你本地配置的nexus对应的地址和端口,根据具体情况修改,在添加之前可以去浏览器中输入此地址查看到的xml,看是否有 groupIdstudio.baxiaartifactIdfoweb-archetype 。不存在则可能是你mvn deploy失败了,重试一下。

Description则是你对该原型在本地仓库中的描述,可自定义。

操作演示如下: (为防止图片在此加载不出来,附上图片地址:Eclipse配置maven本地原型1.gif

(为防止图片在此加载不出来,附上图片地址:Eclipse配置maven本地原型2.gif

新建原型项目测试演示如图:

注意:该框架是前后端分离的,这里的演示没有结合前端页面进行,只能通过api访问查看返回的数据。关于前端的演示则需要用到foweb.client进行。请查看:https://github.com/panhainan/foweb.client

(为防止图片在此加载不出来,附上图片地址:Eclipse新建maven本地原型项目测试.gif

IDEA配置Maven本地原型

对于IDEA,从启动选择项目界面(或者已经进入了项目的界面)进入:Configure(or File) =>Settings => Plugins搜索Maven Archetype Catalogs 插件,安装该插件,然后重启,然后 File=> Settings=> Build,Execution,Deployment => Build Tools => Maven Archetype Catalogs ,然后点击+进行添加catalog,即 http://localhost:8081/nexus/content/groups/public/archetype-catalog.xml 到输入框即可。

操作演示如图:

(为防止图片在此加载不出来,附上图片地址:IDEA配置maven本地原型.gif

新建原型项目测试演示如图:

(为防止图片在此加载不出来,附上图片地址:IDEA新建maven本地原型项目测试.gif

IDEA新建maven本地原型项目测试

源码解释

正在制作中。。。敬请等待!

感谢

觉得好的希望能够star一下,给颗星星,谢谢!

如果觉得好,就请支持一下,谢谢!  

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.