<?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>
说明: 该启动项中的配置 表示 springboot启动时,不会加载数据源相关的配置.
缘由: springBoot容器中有开箱即用的规则.可是前端项目不须要使用数据源.因此经过以下的配置,能够正常的启动项目前端
用户经过http://www.jt.com 的方式访问http://localhost:8092服务器.nginx
# 配置京淘前台服务器 server { listen 80; server_name www.jt.com; location / { proxy_pass http://localhost:8092; } }
1).关于Http/https之间的关系web
2).解决策略spring
1.浏览器中键入: chrome://net-internals/#hsts:chrome
1.预习什么是跨域
2.什么是同源策略
3.什么是JSONP
4.什么是CORSapache