spring boot 、 spring cloud 、 docker 我就呵呵了,反正很火
spring boot 主要做微服务,一般仅仅提供服务,逼格说的简单点,提供一个http请求,返回json。
docker ,呵呵 方便部署,持续交互, 云计算-也即是 虚拟化技术和资源管理,,逼格再低点—运维,
html 页面 不像以前那样 放在web工程目录下,
现在要做的是
图有点丑,没关系
nginx配置
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name 127.0.0.1;
location / {
expires 8h;
root html;
}
}
server {
listen 80;
server_name localhost;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|html)$
{
expires 8h;
root html;
}
location / {
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, OPTIONS, POST, GET";
add_header Access-Control-Allow-Headers $http_access_control_request_headers;
add_header Access-Control-Allow-Credentials "true";
add_header Content-Length 0;
proxy_pass http://10.10.8.63:9002;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
测试的时候 nginx 在 win中
重用命令
start nginx
nginx -s reload
nginx -s stop
spring boot 就仅仅是提供服务了
时间: 2024-10-29 02:48:17