一:STS

1.下载STS

  官网:http://spring.io/tools

  使用一个干净的STS进行操作学习。

2.jdk检查

  

3.添加自己的maven

  

4.使用tomcat

  

二:新建项目

1.新建项目

  新建的是maven项目。

  所有的groupId使用一样的。

2.新建第一个项目

  注意点是打包的时候选择pom,因为这个模块主要是用来打包。

  

  

3.新建第二个项目

  packaging是jar

  

4.新建第三个项目

  

5.新建第四个项目

  

6.新建第五个项目

  

三:第一个项目

1.修改pom

  使用io

    

  复制

    可以让IO来管理,主要是依赖的冲突问题可以不需要考虑。

    

  使用Cloud

    进行依赖管理

    

  POM:

 1 <project xmlns="http://maven.apache.org/POM/4.0.0"
 2     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 4     <modelVersion>4.0.0</modelVersion>
 5     <groupId>com.jun.security</groupId>
 6     <artifactId>it-security</artifactId>
 7     <version>1.0.0-SNAPSHOT</version>
 8     <packaging>pom</packaging>
 9     <dependencyManagement>
10         <dependencies>
11             <dependency>
12                 <groupId>io.spring.platform</groupId>
13                 <artifactId>platform-bom</artifactId>
14                 <version>Brussels-SR4</version>
15                 <type>pom</type>
16                 <scope>import</scope>
17             </dependency>
18             <dependency>
19                 <groupId>org.springframework.cloud</groupId>
20                 <artifactId>spring-cloud-dependencies</artifactId>
21                 <version>Dalston.SR2</version>
22                 <type>pom</type>
23                 <scope>import</scope>
24             </dependency>
25         </dependencies>
26     </dependencyManagement>
27
28     <build>
29         <plugins>
30             <plugin>
31                 <groupId>org.apache.maven.plugins</groupId>
32                 <artifactId>maven-compiler-plugin</artifactId>
33                 <version>2.3.2</version>
34                 <configuration>
35                     <source>1.8</source>
36                     <target>1.8</target>
37                     <encoding>UTF-8</encoding>
38                 </configuration>
39             </plugin>
40         </plugins>
41     </build>49 </project>

2.关联子项目

  添加子模块:

    

  会多出配置:

1         <modules>
2         <module>../it-security-app</module>
3         <module>../it-security-browser</module>
4         <module>../it-security-core</module>
5         <module>../it-security-demo</module>
6     </modules>    

3.然后更新子模块

  因为这个时候子模块的编译不是1.8.

    

  效果:

    

四:添加各个模块的pom

1.it-security-core项目的pom

 1 <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/xsd/maven-4.0.0.xsd">
 2   <modelVersion>4.0.0</modelVersion>
 3   <artifactId>it-security-core</artifactId>
 4   <parent>
 5       <groupId>com.jun.security</groupId>
 6       <artifactId>it-security</artifactId>
 7       <version>1.0.0-SNAPSHOT</version>
 8       <relativePath>../it-security</relativePath>
 9   </parent>
10
11   <dependencies>
12         <dependency>
13             <groupId>org.springframework.cloud</groupId>
14             <artifactId>spring-cloud-starter-oauth2</artifactId>
15         </dependency>
16         <dependency>
17             <groupId>org.springframework.boot</groupId>
18             <artifactId>spring-boot-starter-data-redis</artifactId>
19         </dependency>
20         <dependency>
21             <groupId>org.springframework.boot</groupId>
22             <artifactId>spring-boot-starter-jdbc</artifactId>
23         </dependency>
24         <dependency>
25             <groupId>mysql</groupId>
26             <artifactId>mysql-connector-java</artifactId>
27         </dependency>
28         <dependency>
29             <groupId>org.springframework.social</groupId>
30             <artifactId>spring-social-config</artifactId>
31         </dependency>
32         <dependency>
33             <groupId>org.springframework.social</groupId>
34             <artifactId>spring-social-core</artifactId>
35         </dependency>
36         <dependency>
37             <groupId>org.springframework.social</groupId>
38             <artifactId>spring-social-security</artifactId>
39         </dependency>
40         <dependency>
41             <groupId>org.springframework.social</groupId>
42             <artifactId>spring-social-web</artifactId>
43         </dependency>
44         <dependency>
45             <groupId>commons-lang</groupId>
46             <artifactId>commons-lang</artifactId>
47         </dependency>
48         <dependency>
49             <groupId>commons-collections</groupId>
50             <artifactId>commons-collections</artifactId>
51         </dependency>
52         <dependency>
53             <groupId>commons-beanutils</groupId>
54             <artifactId>commons-beanutils</artifactId>
55         </dependency>
56         <dependency>
57             <groupId>org.springframework.boot</groupId>
58             <artifactId>spring-boot-configuration-processor</artifactId>
59         </dependency>
60     </dependencies>
61 </project>

2.it-security-browser的pom

  先去住目录定义it.security.version版本,到时候在修改core的时候,只要修改一下父变量即可。

  然后引用core,不过需要额外引用session做集群的session管理。

 1 <project xmlns="http://maven.apache.org/POM/4.0.0"
 2     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 4     <modelVersion>4.0.0</modelVersion>
 5     <artifactId>it-security-browser</artifactId>
 6     <parent>
 7         <groupId>com.jun.security</groupId>
 8         <artifactId>it-security</artifactId>
 9         <version>1.0.0-SNAPSHOT</version>
10         <relativePath>../it-security</relativePath>
11     </parent>
12
13     <dependencies>
14         <dependency>
15             <groupId>com.jun.security</groupId>
16             <artifactId>it-security-core</artifactId>
17             <version>${it.security.version}</version>
18         </dependency>
19         <dependency>
20             <groupId>org.springframework.session</groupId>
21             <artifactId>spring-session</artifactId>
22         </dependency>
23         <dependency>
24             <groupId>org.apache.shiro</groupId>
25             <artifactId>shiro-core</artifactId>
26             <version>1.2.2</version>
27         </dependency>
28     </dependencies>
29
30 </project>

3.it-security-app的pom

  只需要引用core。

 1 <project xmlns="http://maven.apache.org/POM/4.0.0"
 2     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 3     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 4     <modelVersion>4.0.0</modelVersion>
 5     <artifactId>it-security-app</artifactId>
 6     <parent>
 7         <groupId>com.jun.security</groupId>
 8         <artifactId>it-security</artifactId>
 9         <version>1.0.0-SNAPSHOT</version>
10         <relativePath>../it-security</relativePath>
11     </parent>
12
13     <dependencies>
14         <dependency>
15             <groupId>com.jun.security</groupId>
16             <artifactId>it-security-core</artifactId>
17             <version>${it.security.version}</version>
18         </dependency>
19     </dependencies>
20 </project>

4.it-security-demo的pom

  先引一个进行开发。

 1 <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/xsd/maven-4.0.0.xsd">
 2   <modelVersion>4.0.0</modelVersion>
 3   <artifactId>it-security-demo</artifactId>
 4   <parent>
 5       <groupId>com.jun.security</groupId>
 6       <artifactId>it-security</artifactId>
 7       <version>1.0.0-SNAPSHOT</version>
 8       <relativePath>../it-security</relativePath>
 9   </parent>
10
11   <dependencies>
12       <dependency>
13             <groupId>com.jun.security</groupId>
14             <artifactId>it-security-browser</artifactId>
15             <version>${it.security.version}</version>
16         </dependency>
17   </dependencies>
18 </project>

  

  

转载于:https://www.cnblogs.com/juncaoit/p/9434303.html

001 Hello Security 的框架搭建相关推荐

  1. React-Native 之 GD (一)目录结构与第三方框架使用与主题框架搭建

    1.APP效果图 2.工程环境配置 IOS: 将压缩包内的 Images.xcassets 文件夹直接替换掉我们iOS工程中的 Images.xcassets 文件夹. 这时候我们可以看到所有图片资源 ...

  2. Spring Boot + Activiti 工作流框架搭建

    文章目录 前言: Java工作流引擎与Activiti 框架搭建环境与步骤总览 创建Spring Boot项目 引入activiti等依赖包 安装activiti designer 绘制流程 流程名以 ...

  3. SpringSecurity(二)、权限项目框架搭建

    Springboot + SpringSecurity权限项目框架搭建 目录 一.项目介绍 二.项目搭建(父子工程) 1.添加 pom 依赖 2.修改 yml 配置 3.编写JwtTokenUtil工 ...

  4. EXTJS入门教程及其框架搭建

    EXTJS是一个兼容AJAX的前台WEB UI的框架,在普通的HTML文件的 BODY 元素中无须写任何HTML代码,就能产生相应的表格等元素. 原创不易,转载请注明出处:EXTJS入门教程及其框架搭 ...

  5. 个人博客系统之框架搭建

    1.写在前面 本篇博客是个人博客系统系列第二篇,以下是其他博客的链接: 个人博客系统整体介绍 2.新建项目 2.1 创建SpringBoot项目 首先新建一个SpringBoot项目,项目信息大家可以 ...

  6. python自动化(五)接口自动化:4.接口自动化框架搭建实战

    一.业务分析 我们这里以企业微信的添加成员业务为例,来讲解我们的自动化测试框架. 企业微信接口文档:https://work.weixin.qq.com/api/doc/90000/90135/901 ...

  7. QUANT[2]:量化交易策略基本框架搭建

    本文是量化交易教程的第二篇 (原文写的比较简单,编程的详解部分面向没有编程基础的人) QUANT[1]:从零开始量化交易 - プロノCodeSteel - CSDN博客 QUANT[2]:量化交易策略 ...

  8. 使用Seq2seq框架搭建对联生成系统

    项目简介 该项目是基于Seq2Seq框架搭建的对联生成系统.(我的自然语言理解课程作业). 该项目参考了官方给出的代码,并在官方基础上进行改进. 然后我写了个报告,发表在论坛了,直达:我的报告 我的贡 ...

  9. 后台基础权限框架搭建实现[木字楠博客]

    文章目录 1.项目整合SpringSecurity 1.1.引入SpringSecurity依赖 1.2.启动测试 1.3.自定义实体类继承UserDetails 1.4.自定义配制文件 1.5.重写 ...

最新文章

  1. soft_argmax
  2. 撰写第三周课程总结及实验报告(一)
  3. ORA-01810: 格式代码出现两次
  4. 适配器模式和装饰模式
  5. 自动拷贝文件至服务器,自动拷贝远程服务器文件
  6. Oracle delete input与delete all input
  7. 压测工具下载地址说明及汇总
  8. Linux如何查看所有的用户和组信息
  9. matlab2c使用c++实现matlab函数系列教程-repmat函数
  10. 《Java从入门到放弃》JavaSE入门篇:变量
  11. 20180310华为面试
  12. 【C语言】通讯录管理系统
  13. 演讲技巧_成功进行技术演讲的11个重要技巧
  14. 如何获取美团外卖推广链接
  15. 赋能 打造应对不确定性的敏捷团队 pdf_《创业书影音》本期推荐《赋能》
  16. SQL Server数据库备份出现-1073548784错误号的解决方法
  17. 数据挖掘技术功能有哪些
  18. antd table 可伸缩列卡优化思路
  19. 教你如何轻松搞定云上打印管理
  20. 正态分布 高斯分布(数学)

热门文章

  1. HDURevenge of Segment Tree(第二长的递增子序列)
  2. 网站链接自动化测试原理及工具介绍
  3. ASP.NET验证控件祥解
  4. ICML 2022 第一届关于新冠病毒的智慧医疗研讨会
  5. 剪枝实践:图像检索如何加速和省显存 ?
  6. 我爱计算机视觉精华文章分类汇总(2018年12月13日)
  7. 【python教程入门学习】必须具备Python Django开发技能
  8. mysql 插入毫秒数据_【转载】怎样在mybatis里向mysql中插入毫秒数的时间?
  9. 重磅更新!YoloV4最新论文!解读yolov4框架
  10. 太棒了!港大同济伯克利推出目标检测新范式:Sparse R-CNN