Skip to content

Instantly share code, notes, and snippets.

Avatar
📖
Focusing

Chen Hui chenhui0212

📖
Focusing
View GitHub Profile
View protobuf-generator-maven-plugin.xml
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>hualalapluginreleases</id>
<name>Hualala Plugin Releases Repository</name>
View application.yml
server:
port: 8080
servlet:
context-path: /omega
spring:
# 数据源
datasource:
# Jdbc
type: com.zaxxer.hikari.HikariDataSource
View SwaggerConfig.java
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMethod;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.builders.ResponseMessageBuilder;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.spi.DocumentationType;
@chenhui0212
chenhui0212 / MavenLoadDependencyJars.java
Last active Sep 19, 2018
Maven手动加载需要的Jar包环境
View MavenLoadDependencyJars.java
@Mojo(name = "generate", defaultPhase = LifecyclePhase.INITIALIZE)
public class ProtoFileGenerator extends AbstractMojo {
@Component
private MavenProject project;
@Component
private PluginDescriptor descriptor;
@Component
private RepositorySystem repoSystem;
@Parameter(defaultValue = "${repositorySystemSession}", readonly = true, required = true)