1. 京淘前端架构设计

2. JT-WEB我的项目创立

2.1 构建JT-WEB

2.2 增加继承/依赖/插件

<?xml version="1.0" encoding="UTF-8"?><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">    <parent>        <artifactId>jt</artifactId>        <groupId>com.jt</groupId>        <version>1.0-SNAPSHOT</version>    </parent>    <modelVersion>4.0.0</modelVersion>    <artifactId>jt-web</artifactId>    <!--因为增加的是动静web资源所以打包临时用war-->    <packaging>war</packaging>    <!--增加依赖-->    <dependencies>        <dependency>            <groupId>com.jt</groupId>            <artifactId>jt-common</artifactId>            <version>1.0-SNAPSHOT</version>        </dependency>    </dependencies>    <!--增加插件-->    <!--增加插件 有main办法时 须要增加插件-->    <build>        <plugins>            <plugin>                <groupId>org.springframework.boot</groupId>                <artifactId>spring-boot-maven-plugin</artifactId>                <configuration>                    <excludes>                        <exclude>                            <groupId>org.projectlombok</groupId>                            <artifactId>lombok</artifactId>                        </exclude>                    </excludes>                </configuration>            </plugin>        </plugins>    </build></project>

2.3 导入配置文件

2.4 编辑启动配置项

2.5 页面成果展示

2.6 对于主启动中注解阐明

阐明: 该启动项中的配置 示意 springboot启动时,不会加载数据源相干的配置.
起因: springBoot容器中有开箱即用的规定.然而前端我的项目不须要应用数据源.所以通过如下的配置,能够失常的启动我的项目

3.增加nginx配置

3.1 配置要求

用户通过http://www.jt.com 的形式拜访http://localhost:8092服务器.

3.2 编辑Hosts文件

3.3 编辑Nginx配置文件

# 配置京淘前台服务器    server {        listen 80;        server_name www.jt.com;        location / {            proxy_pass http://localhost:8092;        }    }

3.4 成果展示

3.5 对于谷歌浏览器Https协定报错阐明

1).对于Http/https之间的关系

2).解决策略

1.浏览器中键入: chrome://net-internals/#hsts:

1.预习什么是跨域
2.什么是同源策略
3.什么是JSONP
4.什么是CORS