All Projects → mtdhb → Api

mtdhb / Api

Licence: gpl-3.0
每天大红包 · 服务端

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Api

New Bee
开源社区 vue + springBoot - 前后分离微服务的最佳实践
Stars: ✭ 619 (+500.97%)
Mutual labels:  spring-data-jpa
Springbootrestapihibernatejpamysqltutorial
Stars: ✭ 32 (-68.93%)
Mutual labels:  spring-data-jpa
Sample Spring Cloud Webflux
sample microservices demonstrating usage of spring reactive support with spring webflux and integration spring cloud, eureka, ribbon, spring cloud gateway, spring data jpa and mongodb
Stars: ✭ 65 (-36.89%)
Mutual labels:  spring-data-jpa
Spring Boot Examples
about learning Spring Boot via examples. Spring Boot 教程、技术栈示例代码,快速简单上手教程。
Stars: ✭ 26,812 (+25931.07%)
Mutual labels:  spring-data-jpa
Cloud Enabled Microservice
Tasks microservice (Spring Boot, MVC, Data, Lombok, Cloud, OAuth2, Config, Eureka, Zuul, Hystrix, Docker)
Stars: ✭ 14 (-86.41%)
Mutual labels:  spring-data-jpa
Market
Simple web-market: Spring, JSP, REST, Hibernate (under modernization)
Stars: ✭ 47 (-54.37%)
Mutual labels:  spring-data-jpa
Elementvuespringbootcodetemplate
使用Vue+VueX+ElementUI+SpringBoot的代码框架
Stars: ✭ 597 (+479.61%)
Mutual labels:  spring-data-jpa
Spring Boot Shopping Cart
Simple shopping cart web app made using Spring Boot + Thymeleaf
Stars: ✭ 85 (-17.48%)
Mutual labels:  spring-data-jpa
V5cmsjava
Spring+SpringMVC+Spring Data JPA+FreeMarker+Bootstarp(master分支),mybatis分支ORM使用的是MyBatis。
Stars: ✭ 29 (-71.84%)
Mutual labels:  spring-data-jpa
Rsql Jpa Specification
Java Library to Translate RSQL into Spring Data JPA Specification and QueryDSL Predicate
Stars: ✭ 62 (-39.81%)
Mutual labels:  spring-data-jpa
Sample Hazelcast Spring Datagrid
sample spring-boot applications integrated with hazelcast imdg, and providing hot cache with hazelcast and striim
Stars: ✭ 16 (-84.47%)
Mutual labels:  spring-data-jpa
Spring Mvc Thymeleaf Crud
Spring MVC CRUD Application with Thymeleaf, HTML5, CSS3 and Bootstrap
Stars: ✭ 14 (-86.41%)
Mutual labels:  spring-data-jpa
Tianti
java轻量级的CMS解决方案-天梯。天梯是一个用java相关技术搭建的后台CMS解决方案,用户可以结合自身业务进行相应扩展,同时提供了针对dao、service等的代码生成工具。技术选型:Spring Data JPA、Hibernate、Shiro、 Spring MVC、Layer、Mysql等。
Stars: ✭ 1,053 (+922.33%)
Mutual labels:  spring-data-jpa
Jpa Spec
A JPA Query By Specification framework.
Stars: ✭ 620 (+501.94%)
Mutual labels:  spring-data-jpa
Spring Examples
SpringBoot Examples
Stars: ✭ 67 (-34.95%)
Mutual labels:  spring-data-jpa
Springboot Starterkit
Starter Kit for Spring Boot based (REST APIs and WebMVC) micro services.
Stars: ✭ 596 (+478.64%)
Mutual labels:  spring-data-jpa
Springboot Project
这是一个用SpringBoot+JPA打造的基于微信服务号平台的点餐系统的后端,前端是一个使用Vue.js构建的运行于微信公众号的WebApp。前后端完全分离,前后端之间通过RESTful风格的接口相连。
Stars: ✭ 1,034 (+903.88%)
Mutual labels:  spring-data-jpa
Jplusone
Tool for automatic detection and asserting "N+1 SELECT problem" occurences in JPA based Spring Boot Java applications and finding origin of JPA issued SQL statements in general
Stars: ✭ 91 (-11.65%)
Mutual labels:  spring-data-jpa
Springboot Projects Fullstack
Spring Boot, JDBC, ORM, JPA, Hibernate, H2, MySQL, Oracle
Stars: ✭ 76 (-26.21%)
Mutual labels:  spring-data-jpa
Springboard
Spring Boot based production grade starter kit.
Stars: ✭ 59 (-42.72%)
Mutual labels:  spring-data-jpa

api

Build Status GPL-3.0

服务端,需配合 mtdhb/get 使用

Environment

MySQL 5.7

Redis 4.0.9

JDK 1.8+

Nginx 1.12.2

MySQL

CREATE DATABASE api;
USE api;
\. 绝对路径ddl.sql

Redis

默认配置

Java

Configuration

DATASOURCE

src/main/resources/application-prod.yml

spring:
    datasource:
        url: jdbc:mysql://127.0.0.1:3306/api?useUnicode=true&characterEncoding=UTF-8&useSSL=false
        username: 你的数据库用户名
        password: 你的数据库密码

EMAIL

src/main/resources/mail0.properties

mail.transport.protocol=smtp
mail.smtp.host=你的邮箱的 SMTP 服务器地址
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.port=465
mail.smtp.auth=true

# Custom
com.mtdhb.mail.personal=\u6BCF\u5929\u5927\u7EA2\u5305
com.mtdhb.mail.user=你的邮箱账号
com.mtdhb.mail.password=你的邮箱密码

支持多邮箱配置,你只需在 src/main/resources/ 目录下新增 mail*.properties 并保证文件名最后的索引数字是连续递增的即可。

Package

mvn clean package

Run

# 开发
java -jar target/api-1.0.0.jar --spring.profiles.active=dev
# 生产
nohup java -XX:+HeapDumpOnOutOfMemoryError -jar target/api-1.0.0.jar --spring.profiles.active=prod > target/console.log 2>&1 &

Shutdown

curl -X POST http://127.0.0.1:8081/actuator/shutdown

Nginx

部分 nginx 配置(与本站服务器不完全一致,删减了部分配置,仅供参考)

map $http_origin $corsHost {
    default 0;
    "~https://你的网页域名.com" https://你的网页域名.com;
    "~http://localhost:4001" http://localhost:4001;
    "~http://127.0.0.1:4001" http://127.0.0.1:4001;
}

server {
    listen 443 ssl default_server;
    server_name 你的API域名;

    add_header Access-Control-Allow-Credentials true;
    add_header Access-Control-Allow-Origin $corsHost;
    add_header Access-Control-Allow-Headers X-User-Token;
    add_header Access-Control-Allow-Methods 'GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE';

    expires -1;

    if ($request_method = 'OPTIONS') {
        return 204;
    }

    if ($server_port !~ 443) {
        rewrite ^(/.*)$ https://$host$1 permanent;
    }

    location = /notice.json {
        expires 1m;
        root /存放公告的目录;
    }

    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].