<?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