推荐这个项目是基于因为使用手册部署手册非常完善,项目也有开发教程视频对小白非常贴心,系统香接私活可以直(zhi)接拿去二开非常舒服

<dependency><groupId>net.mingsoft</groupId><artifactId>模块</artifactId><version>版本号</version><classifier>sources</classifier><scope>provided</scope></dependency>基于MIT开源协议,可直接商用无需授权,业官但请尊重开源精神不要去掉代码中铭飞的基于注释和版权信息

建议开发(fa)者使用以(yi)下环境,这样避免版本带来的问(wen)题

MCms内容插件提供最基本的菜单、权限、角色、栏目、内容、静态化(hua)、等常用功能。
视频教程:内容插件视频教程 配合代码生成器使(shi)用快速提升开发效率:代码生成(cheng)器在(zai)线视频教(jiao)程、代码生成器(qi)使用(yong)文档
<!-- ms-mcms 内容模块插件 --><dependency><groupId>net.mingsoft</groupId><artifactId>ms-mcms</artifactId><version>当前版本</version></dependency><!-- ms-mcms 内容(rong)模块源码 --><dependency><groupId>net.mingsoft</groupId><artifactId>ms-mcms</artifactId><version>当前版本</version><classifier>sources</classifier></dependency>Copy
项目访问路径/swagger-ui.html#/
系统部署手册
懒人做法,将所有的(de)资源打成一个(ge)jar包,维护资源不方便,不推荐
mvnclean packagejava-jar ms-mcms.jarCopy
打包指令增加参数 -f bin-xml ,执行完成会在target目录会(hui)生成 “ 项目-bin ” 发布文件夹
mvn clean package-f bin-xml Copy
config:配置文件
html:静态化自动生成的目录(自动生成)
static:静态资(zi)源文件
templets:(必须)模版目录,需要复制(zhi)一份
upload:(必须)上传的文件夹
WEB-INF:ftl视图文(wen)件
mcms.log:自动生成的(de)日志文件
*.sh:linux启动、停止脚本
*.bat:window启动、停止脚本
|
技术 |
名称 |
官网 |
| Spring Framework |
容器 |
http://projects.spring.io/spring-framework |
| Spring Boot | MVC框架
|
https://spring.io/projects/spring-boot |
| Apache Shiro | 安全框架 |
http://shiro.apache.org |
|
Spring session |
分布式Session管理 |
http://projects.spring.io/spring-session |
|
MyBatis | ORM框架
| http://www.mybatis.org |
|
Freemarker |
视图框架 |
http://freemarker.foofun.cn |
| PageHelper |
MyBatis分页插件 | http://git.oschina.net/free/Mybatis_PageHelper |
| Log4J | 日志组(zu)件 | http://logging.apache.org |
| Maven |
项目构建 | http://maven.apache.org |
| Elasticsearch |
分布式搜索引擎 |
https://www.elastic.co |
| Redis |
分布(bu)式缓存数据库 |
https://redis.io |
| hutool | 工(gong)具类 | http://hutool.mydoc.io |
| 技术 | 名称 | 官网 |
| vue |
函式库 |
https://cn.vuejs.org// |
| element ui |
UI库 |
https://element.eleme.cn/2.0/#/zh-CN |
| jQuery |
函式库 | http://jquery.com/ |
|
Bootstrap |
前端框架 | http://getbootstrap.com/ |
|
Bootstrap-table | Bootstrap数据(ju)表(biao)格 |
http://bootstrap-table.wenzhixin.net.cn/ |
| BootstrapValidator |
表单验证 |
http://bootstrapvalidator.com/ |
|
Font-awesome | 字体图标 | http://fontawesome.io/ |
| Waves | 点击效果插件(jian) | https://github.com/fians/Waves/ |
|
zTree | 树插件 |
http://www.treejs.cn/v3/ |
| Select2 |
选择框插件 |
https://github.com/select2/select2 |
|
Vue |
MVVM框架 | https://cn.vuejs.org/ |
| AmazeUI | 移动端UI |
http://amazeui.org/ |
|
Plupload |
上传控件 |
http://www.plupload.com/ |
| freemarker |
模板引擎 |
http://freemarker.foofun.cn/toc.html |
| validator |
验证库 | https://github.com/chriso/validator.js |
|
animate | 动(dong)画 |
http://daneden.github.io/animate.css/ |
| icon |
矢量小图(tu)标(待更新) |
http://ms.mingsoft.net/html/86//6048/index.html |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
做开源我们是业余的,写代(dai)码我们是认真(zhen)的。研发产品的路上我们一直在探索、一直在学习(xi)、一直在(zai)用心投入,希望能给更多的(de)企业与(yu)开发者提供一些更有价值的服务。
|
|
|
|
|
|
|
|
源码资料获取(qu)方式:关注小编+转发文(wen)章+私信【 666 】免费获取
八股文面试资料获取方式:关注小编+转发文章+私信【 13 】免费获取
重要(yao)的事情说三遍,转发+转发+转发,一定要记得点赞转发(fa)哦!!!
面(mian)试官:Spring 和 Spring Boot 的区别是什么?
对于 Spring和 SpringBoot到底有什么区别(bie),我听到了(le)很多答案,刚开始迈入学习 SpringBoot的(de)我(wo)当时也是一头雾水,随着经验的积累、我慢慢理解了这两个框架到底有什(shen)么区别,相信对于用了 SpringBoot很久的同学来说,还(hai)不是(shi)很理解 SpringBoot到底和 Spring有(you)什么区别,看完文章中(zhong)的比较,或许你(ni)有了不同的(de)答案和看法!
作为 Java开发人员,大家(jia)都 Spring都不陌生,简而言之, Spring框架为开发 Java应用程序提(ti)供了全面的基础(chu)架构支持。它包含一些很好的功能,如依赖注入和开箱即用的模块,如:
SpringBoot基本上(shang)是(shi) Spring框架的扩展,它消除了设置 Spring应用程序所需的 XML配置,为(wei)更快,更高效的开发生态系统铺平了道路(lu)。
SpringBoot中的(de)一些特征:
1、创建独立的 Spring应用。
2、嵌入式 Tomcat、 Jetty、 Undertow容器(无需部署war文件(jian))。
3、提供的 starters简化构建配置
4、尽可能自动配置 spring应(ying)用(yong)。
5、提供生(sheng)产指标,例如指标、健壮检查和(he)外(wai)部化配置
6、完全没有代码生成和 XML配置要求
首先,让我们看一下使用Spring创建Web应用程序所需的最小依赖项
<dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId><version>5.1.0.RELEASE</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>5.1.0.RELEASE</version></dependency>
与(yu)Spring不同,Spring Boot只需要一个依赖项来启动和(he)运行Web应用程(cheng)序:
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><version>2.0.6.RELEASE</version></dependency>在进行(xing)构建期间,所(suo)有其他依赖项将自动添加到项目中。
另一个很好的例子就是测试库。我们通常使用 SpringTest, JUnit, Hamcrest和 Mockito库。在 Spring项目中,我们应该将所有这(zhe)些库添加为依赖项。但是在 SpringBoot中,我们只(zhi)需要添加 spring-boot-starter-test依赖项来自动包含这些库。
Spring Boot为不同的Spring模块提(ti)供了许多依赖项。一些最常用的是:
spring-boot-starter-data-jpaspring-boot-starter-securityspring-boot-starter-testspring-boot-starter-webspring-boot-starter-thymeleaf
有关 starter的完整列表,请查看Spring文档。
让我们来看一下 Spring和 SpringBoot创建 JSPWeb应用程序所需的配置。
Spring需(xu)要(yao)定义调度程序 servlet,映射和其他支(zhi)持配置。我们可以使用 web.xml文件或 Initializer类来完成此操作:
publicclassMyWebAppInitializerimplementsWebApplicationInitializer{ @OverridepublicvoidonStartup(ServletContext container){ AnnotationConfigWebApplicationContext context = newAnnotationConfigWebApplicationContext(); context.setConfigLocation("com.pingfangushi"); container.addListener(newContextLoaderListener(context)); ServletRegistration.Dynamic dispatcher = container .addServlet("dispatcher", newDispatcherServlet(context)); dispatcher.setLoadOnStartup(1); dispatcher.addMapping("/"); } }还需要将 @EnableWebMvc注释添加(jia)到 @Configuration类(lei),并定义一个视图(tu)解析器来解析从(cong)控制(zhi)器返回的视图:
@EnableWebMvc@ConfigurationpublicclassClientWebConfigimplementsWebMvcConfigurer{ @BeanpublicViewResolver viewResolver(){ InternalResourceViewResolver bean = newInternalResourceViewResolver(); bean.setViewClass(JstlView.class); bean.setPrefix("/WEB-INF/view/"); bean.setSuffix(".jsp"); returnbean; } }再来看 SpringBoot一旦我们添加了(le) Web启动程(cheng)序, SpringBoot只需要在 application配置文件中配置几个属性来完成如(ru)上操作:
spring.mvc.view.prefix=/WEB-INF/jsp/ spring.mvc.view.suffix=.jsp
上(shang)面的所有Spring配置都是通(tong)过一个名为(wei)auto-configuration的过程(cheng)添加 Bootweb starter来自动包含的。
这(zhe)意(yi)味着 SpringBoot将查看(kan)应用程序中存在的依赖项,属性和 bean,并根据这些依赖项,对属性和 bean进行配置。当然,如果我们想要添加自己的自定义配置,那么 SpringBoot自动配置将会退回。
现在我们来看下如何在Spring和Spring Boot中配置Thymeleaf模板引擎。
@Configuration@EnableWebMvcpublicclassMvcWebConfigimplementsWebMvcConfigurer{ @AutowiredprivateApplicationContext applicationContext; @BeanpublicSpringResourceTemplateResolver templateResolver(){ SpringResourceTemplateResolver templateResolver = newSpringResourceTemplateResolver(); templateResolver.setApplicationContext(applicationContext); templateResolver.setPrefix("/WEB-INF/views/"); templateResolver.setSuffix(".html"); returntemplateResolver; } @BeanpublicSpringTemplateEngine templateEngine(){ SpringTemplateEngine templateEngine = newSpringTemplateEngine(); templateEngine.setTemplateResolver(templateResolver()); templateEngine.setEnableSpringELCompiler(true); returntemplateEngine; } @OverridepublicvoidconfigureViewResolvers(ViewResolverRegistry registry){ ThymeleafViewResolver resolver = newThymeleafViewResolver(); resolver.setTemplateEngine(templateEngine()); registry.viewResolver(resolver); } }SpringBoot1X只需(xu)要
spring-boot-starter-thymeleaf的(de)依赖项来启用 Web应用程序中的 Thymeleaf支持(chi)。 但是由于 Thymeleaf3.0中的新(xin)功能,我们必须将 thymeleaf-layout-dialect添加为 SpringBoot2XWeb应用(yong)程序中的依赖项。配置好依赖,我们就可以将模板添加到
src/main/resources/templates文件夹中, SpringBoot将自动显示它们。
为简单起见,我们使用框架默认(ren)的 HTTPBasic身份验证。让我们首先看一下使用 Spring启用 Security所需的依赖关系和(he)配置。
Spring首先需要(yao)依赖 spring-security-web和 spring-security-config模块。接下来, 我们需要添加一个扩展
WebSecurityConfigurerAdapter的类,并使用 @EnableWebSecurity注解:
@Configuration@EnableWebSecuritypublic class CustomWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter { @Autowiredpublic void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication() .withUser("admin") .password(passwordEncoder() .encode("password")) .authorities("ROLE_ADMIN"); } @Overrideprotectedvoidconfigure(HttpSecurity http) throwsException{ http.authorizeRequests() .anyRequest().authenticated() .and() .httpBasic(); } @BeanpublicPasswordEncoderpasswordEncoder() { returnnewBCryptPasswordEncoder(); } }这里我们使用 inMemoryAuthentication来设置身份验证。同样, SpringBoot也需要这些依赖项才能使其工作。但是我们只需要(yao)定(ding)义
spring-boot-starter-security的依赖关系,因为这会自(zi)动将所(suo)有相关的依赖项添加到类路径中。
SpringBoot中(zhong)的安全配置与上(shang)面的相(xiang)同。
Spring和 SpringBoot中应用程序引导的基(ji)本区别(bie)在于 servlet。Spring使用 web.xml或(huo)
SpringServletContainerInitializer作(zuo)为其引导入口点。SpringBoot仅使用 Servlet3功能来引导应用程序,下面让我们详细来了解(jie)下
Spring支持传统(tong)的 web.xml引导方式以及最新的 Servlet3+方法(fa)。
配置 web.xml方法启动(dong)的步骤
Servlet容器(服务器)读取 web.xml
web.xml中定义的 DispatcherServlet由(you)容器实例化
使用 Servlet3+方法的 Spring启动步骤
容器搜索实现
Spring Boot应用程(cheng)序的入口点是使用(yong)@SpringBootApplication注释的类
@SpringBootApplicationpublicclassApplication{ publicstaticvoidmain(String[] args){ SpringApplication.run(Application.class, args); } }ServletContextInitializerbean从应用程序上下文绑定到嵌入式 servlet容器。SpringBoot的另一个特性是它会自动扫描同一个包中(zhong)的所有类或 Main类的子包中的组件。
SpringBoot提供了将其部署到外部容器的方式。我们只需(xu)要扩展
SpringBootServletInitializer即可:
/** * War部署 * * @authorSanLi * Created by 2689170096@qq.com on 2018/4/15 */publicclassServletInitializerextendsSpringBootServletInitializer{ @OverrideprotectedSpringApplicationBuilder configure(SpringApplicationBuilder application){ returnapplication.sources(Application.class); } @OverridepublicvoidonStartup(ServletContext servletContext)throwsServletException { super.onStartup(servletContext); servletContext.addListener(newHttpSessionEventPublisher()); } }这里外部 servlet容器查找在war包下的 META-INF文件夹下MANIFEST.MF文件中定义的 Main-class,
SpringBootServletInitializer将负责绑定 Servlet, Filter和 ServletContextInitializer。
最后,让我们看看如何打包和部署应用程序。这两个框架都支持 Maven和 Gradle等通用包管理技术。但是在部署方面,这些框架差异很(hen)大。例如,Spring Boot Maven插件在 Maven中提供 SpringBoot支持(chi)。它还允许打(da)包可执行 jar或 war包并 就地运行(xing)应用程序。
1、提供嵌入式容器支持
3、在外部容器中部署时,可以选择排除依赖关系以避免潜在的(de)jar冲突
4、部署时灵活指定配置文件的选项
版权声明:本文内(nei)容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容(rong), 请发(fa)送邮件至 1817475@qq.com 举报,一经查实,本站将立刻删除。
电话:18048819230
网 址:http://bindebake.cn/
邮 箱:59751829@qq.com
地 址:北京市延庆区66号