Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lichong-a committed Jun 16, 2024
0 parents commit de76441
Show file tree
Hide file tree
Showing 41 changed files with 1,437 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
65 changes: 65 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.hibernate.orm' version '6.5.2.Final'
id 'org.graalvm.buildtools.native' version '0.10.2'
}

group = 'com.eoi'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
}

ext {
set('springCloudVersion', "2023.0.2")
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-ldap'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}

hibernate {
enhancement {
enableAssociationManagement = true
}
}

tasks.named('test') {
useJUnitPlatform()
}
39 changes: 39 additions & 0 deletions common/core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
plugins {
id 'org.hibernate.orm' version '6.5.2.Final'
id 'org.graalvm.buildtools.native' version '0.10.2'
}

java {
withSourcesJar()
withJavadocJar()
}

dependencies {
api 'com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery'
api 'org.springframework.boot:spring-boot-starter-actuator'
api 'org.springframework.boot:spring-boot-starter-data-jpa'
api 'org.springframework.boot:spring-boot-starter-data-ldap'
api 'org.springframework.boot:spring-boot-starter-data-redis'
api 'org.springframework.boot:spring-boot-starter-oauth2-client'
api 'org.springframework.boot:spring-boot-starter-security'
api 'org.springframework.boot:spring-boot-starter-web'
api 'org.flywaydb:flyway-core'
api 'org.springframework.cloud:spring-cloud-starter-openfeign'
api 'org.springframework.cloud:spring-cloud-starter-loadbalancer'
developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
runtimeOnly 'org.postgresql:postgresql'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

hibernate {
enhancement {
enableAssociationManagement = true
}
}

tasks.named('test') {
useJUnitPlatform()
}
Binary file added common/core/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions common/core/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class BusinessException {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.entity;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class BaseEntity {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.http.handler;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class ExceptionData {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.http.handler;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class GlobalExceptionHandler {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.http.response;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class ResponseResult {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.http.response;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/
@Getter
@AllArgsConstructor
public enum ResponseStatus {
SUCCESS("200", "success"),
FAIL("500", "failed"),

HTTP_STATUS_200("200", "ok"),
HTTP_STATUS_400("400", "request error"),
HTTP_STATUS_401("401", "no authentication"),
HTTP_STATUS_403("403", "no authorities"),
HTTP_STATUS_500("500", "server error");

/**
* response code
*/
private final String responseCode;

/**
* description.
*/
private final String description;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.repository;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class IBaseRepository {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright 2024 李冲. All rights reserved.
*
*/

package com.eoi.portal.server.core.base.service;/**
*
*
* @author 李冲
* @see <a href="https://lichong.work">李冲博客</a>
* @since 0.0.1
*/public class IBaseService {
}
Loading

0 comments on commit de76441

Please sign in to comment.