Skip to content

Commit

Permalink
init: 🎉init project
Browse files Browse the repository at this point in the history
  • Loading branch information
hks2002 committed Mar 9, 2023
0 parents commit 0ad0646
Show file tree
Hide file tree
Showing 39 changed files with 2,470 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/Build-Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
on:
workflow_dispatch:
push:
tags:
- 'v*'

# https://github.com/OWNER/REPO/settings/actions
# MUST CHANGE GITHUB_TOKEN PERMISSION FROM READ TO WRITE
# MUST CHANGE GITHUB_TOKEN PERMISSION ALLOW PULL REQUESTS
permissions:
contents: write
pull-requests: write

jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare database
run: PGPASSWORD=postgres psql -h localhost -U postgres -p 5432 -f './src/test/resources/TEST.sql'

- name: Install JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
cache: 'maven'

- name: Run tests
run: mvn test

release-please:
needs: build-and-test
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: maven
#package-name: release-please-action
39 changes: 39 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
workflow_dispatch:
push:
branches:
- 'main'

jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Prepare database
run: PGPASSWORD=postgres psql -h localhost -U postgres -p 5432 -f './src/test/resources/TEST.sql'

- name: Install JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
cache: 'maven'

- name: Run tests
run: mvn test
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties

.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

# Eclipse m2e generated files
# Eclipse Core
.project

# JDT-specific (Eclipse Java Development Tools)
.classpath

### VS Code ###


### spring-boot ###
application-prod.properties
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tabWidth": 4,
"singleQuote": true,
"semi": false,
"trailingComma": "none",
"bracketSameLine": true,
"printWidth": 120
}
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"mwpb.java-prettier-formatter",
"merbleueaviation.auto-header-plus",
"merbleueaviation.emoji-commit-tiny"
],
"unwantedRecommendations": ["vscjava.vscode-java-dependency", "vscjava.vscode-spring-boot-dashboard"]
}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"configurations": [
{
"type": "java",
"name": "Spring Boot-RptSrvApplication<rptSrv>",
"request": "launch",
"cwd": "${workspaceFolder}",
"mainClass": "sageAssistant.RptSrvApplication",
"projectName": "rptSrv",
"args": "",
"envFile": "${workspaceFolder}/.env"
}
]
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic",
"cSpell.customDictionaries": {
"project-words": {
"name": "project-words",
"description": "Words used in this project",
"path": "${workspaceRoot}/project-words.txt",
"addWords": true
},
"custom": true, // Enable the `custom` dictionary
"internal-terms": false // Disable the `internal-terms` dictionary
}
}
19 changes: 19 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.0.4/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.0.4/maven-plugin/reference/html/#build-image)
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/3.0.4/reference/htmlsingle/#using.devtools)
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.0.4/reference/htmlsingle/#web)
* [Spring Configuration Processor](https://docs.spring.io/spring-boot/docs/3.0.4/reference/htmlsingle/#appendix.configuration-metadata.annotation-processor)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)

22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2019-PRESENT Anthony Fu<https://github.com/antfu>
Copyright (c) 2018-2019 think2011<https://github.com/think2011>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Crystal Report Server Java

![Github Version](https://img.shields.io/github/v/release/hks2002/crystal-report-server-java?display_name=release)
![Github Build Status](https://img.shields.io/github/actions/workflow/status/hks2002/crystal-report-server-java/Build.yml)
![GitHub License](https://img.shields.io/github/license/hks2002/crystal-report-server-java)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![release-please: angular](https://img.shields.io/badge/release--please-angular-e10079??style=flat&logo=google)](https://github.com/google-github-actions/release-please-action)

[English](./README.md) | [简体中文](./README.zh-cn.md)

An Crystal Report server run in java.

### How to Use

1. Config your database url, driverClassName, user, password in `application.properties`.
2. Add your db driver in `pom.xml` as necessary.
3. Run `maven package` to get `war` package.
4. Copy `war` to tomcat, and run tomcat.
5. Copy your crystal report files to `WEB-INF/classes/reports` folder, you can add them at anytime.
6. Open `http://server:port/Report/{ReportTemplateName}/{format}?param0=val0&param1=val1` in browser, you can see your report.

> Note: `{ReportTemplateName}` is the name of your report file without extension, `{format}` is the format you want, such as `pdf` `doc` `xls`, `param0` and `param1` are the parameters of your report, give a param named with `NO`, this param value will be used as the file name.
20 changes: 20 additions & 0 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Crystal Report Server Java (水晶报表 Java 服务器)

![Github Version](https://img.shields.io/github/v/release/hks2002/crystal-report-server-java?display_name=release)
![Github Build Status](https://img.shields.io/github/actions/workflow/status/hks2002/crystal-report-server-java/Build.yml)
![GitHub License](https://img.shields.io/github/license/hks2002/crystal-report-server-java)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![release-please: angular](https://img.shields.io/badge/release--please-angular-e10079??style=flat&logo=google)](https://github.com/google-github-actions/release-please-action)

一个基于 java 的水晶报表服务器。

### 如何使用

1.`application.properties` 中配置数据库连接信息。
2. 根据需要在 `pom.xml` 中添加数据库驱动。
3. 运行 `maven package` 生成 `war` 包。
4.`war` 包拷贝到 tomcat 中运行。
5. 将水晶报表文件拷贝到 `WEB-INF/classes/reports` 文件夹中,可以随时添加。
6. 在浏览器中打开 `http://server:port/Report/{ReportTemplateName}/{format}?param0=val0&param1=val1`,即可看到报表。

> 说明:`{ReportTemplateName}` 是报表文件名,不包含扩展名;`{format}` 是报表格式,如 `pdf` `doc` `xls``param0``param1` 是报表参数,如果有一个参数名包含 `NO`,则该参数值将作为文件名。
Binary file added lib/CrystalCommon2.jar
Binary file not shown.
Binary file added lib/CrystalReportsRuntime.jar
Binary file not shown.
Binary file added lib/DatabaseConnectors.jar
Binary file not shown.
Binary file added lib/JDBInterface.jar
Binary file not shown.
Binary file added lib/QueryBuilder.jar
Binary file not shown.
Binary file added lib/com.azalea.ufl.barcode.1.0.jar
Binary file not shown.
Binary file added lib/commons-configuration-1.2.jar
Binary file not shown.
Binary file added lib/cvom.jar
Binary file not shown.
Binary file added lib/jai_imageio.jar
Binary file not shown.
Binary file added lib/jrcerom.jar
Binary file not shown.
Binary file added lib/keycodeDecoder.jar
Binary file not shown.
Binary file added lib/logging.jar
Binary file not shown.
Binary file added lib/pfjgraphics.jar
Binary file not shown.
Loading

0 comments on commit 0ad0646

Please sign in to comment.