diff --git a/.drone/Dockerfile b/.drone/Dockerfile deleted file mode 100644 index e864726..0000000 --- a/.drone/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG BASE_IMAGE - -FROM $BASE_IMAGE - -LABEL maintainer="dev@ujar.org" -ARG BUILD_VERSION -ENV APPLICATION_BUILD_VERSION ${BUILD_VERSION} - -WORKDIR /opt/app - -COPY ./target/*.jar /opt/app/app.jar - -ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Duser.timezone=UTC -jar /opt/app/app.jar"] -EXPOSE 8080 diff --git a/.drone/pipelines.yml b/.drone/pipelines.yml deleted file mode 100644 index 0d76f83..0000000 --- a/.drone/pipelines.yml +++ /dev/null @@ -1,440 +0,0 @@ -kind : pipeline -name : CodeVerification -type : docker - -trigger : - event : - - push - - tag - -volumes : - - name : m2cache - host : - path : /app/.m2 - -steps : - - - name : code-coverage-gate - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - volumes : - - name : m2cache - path : /root/.m2 - environment : - DEPLOYER_USERNAME : - from_secret : DEPLOYER_USERNAME - DEPLOYER_PASSWORD : - from_secret : DEPLOYER_PASSWORD - commands : - - mvn -version - - mvn dependency:resolve -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD - - mvn clean verify -Dstyle.color=always -Dmaven.javadoc.skip=true -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD - - - name : static-analysis-gate - depends_on : - - code-coverage-gate - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - volumes : - - name : m2cache - path : /root/.m2 - environment : - DEPLOYER_USERNAME : - from_secret : DEPLOYER_USERNAME - DEPLOYER_PASSWORD : - from_secret : DEPLOYER_PASSWORD - SONAR_HOST : - from_secret : SONAR_HOST - SONAR_TOKEN : - from_secret : SONAR_TOKEN - commands : - - mvn org.apache.maven.plugins:maven-dependency-plugin:3.5.0:copy-dependencies -Dmdep.prependGroupId=true -Dstyle.color=always -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD - - mvn sonar:sonar '-Dsonar.java.libraries=target/dependency/*.jar' '-Dsonar.java.test.libraries=target/classes,target/dependency/*.jar' -Dsonar.qualitygate.wait=true -Dsonar.qualitygate.timeout=300 -Dsonar.host.url=$SONAR_HOST -Dsonar.login=$SONAR_TOKEN -Dsonar.projectKey=${DRONE_REPO_OWNER}:${DRONE_REPO_NAME} -Dsonar.projectName=${DRONE_REPO_OWNER}:${DRONE_REPO_NAME} -Dstyle.color=always -Dmaven.javadoc.skip=true --batch-mode -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD - - pmd check -d src -f text -R https://raw.githubusercontent.com/pmd/pmd/master/pmd-java/src/main/resources/rulesets/java/basic.xml - - mvn com.github.spotbugs:spotbugs-maven-plugin:4.7.3.4:check -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD -Dspotbugs.xmlOutput=true -Dspotbugs.failOnError=true -Dspotbugs.excludeFilterFile=../spotbugs-exclude.xml -Dspotbugs.includeTests=true -Dstyle.color=always - - - name : notify-slack-on-failure - image : plugins/slack - settings : - webhook : - from_secret : SLACK_WEBHOOK - channel : dev - template : > - :red_circle: :thunder_cloud_and_rain: {{build.link}} ({{build.branch}}) by {{build.author}} - when : - status : - - failure - depends_on : - - code-coverage-gate - - static-analysis-gate - ---- - -kind : pipeline -name : ArtifactsPublishing -type : docker - -trigger : - event : - - push - - tag - ref : - - refs/heads/develop - - refs/heads/prerelease* - - refs/heads/*.*.x - - refs/tags/* - -depends_on : - - CodeVerification - -volumes : - - name : m2cache - host : - path : /app/.m2 - -steps : - - name : publish-snapshot-jar - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - volumes : - - name : m2cache - path : /root/.m2 - environment : - DEPLOYER_USERNAME : - from_secret : DEPLOYER_USERNAME - DEPLOYER_PASSWORD : - from_secret : DEPLOYER_PASSWORD - commands : - - mvn deploy -Dstyle.color=always -DskipTests -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD -DaltDeploymentRepository=kh-contrib-snapshots-repo::https://know-how.nexus/repository/maven-snapshots - when : - branch : - include : - - "develop" - - "prerelease/*" - - "*.*.x" - - - name : publish-release-jar - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - volumes : - - name : m2cache - path : /root/.m2 - environment : - DEPLOYER_USERNAME : - from_secret : DEPLOYER_USERNAME - DEPLOYER_PASSWORD : - from_secret : DEPLOYER_PASSWORD - commands : - - mvn deploy -Dstyle.color=always -DskipTests -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD -DaltDeploymentRepository=kh-contrib-releases-repo::https://know-how.nexus/repository/maven-releases - when : - ref : - - "refs/tags/*" - - - name : create-github-release - image : plugins/github-release - settings : - api_key : - from_secret : GITHUB_API_KEY - title : ${DRONE_TAG} - note : "**Full Changelog**: https://github.com/${DRONE_REPO}/commits/${DRONE_TAG}" - files : ./target/*.jar - when : - ref : - - "refs/tags/*" - depends_on : - - publish-release-jar - - - name : notify-slack - image : plugins/slack - settings : - webhook : - from_secret : SLACK_WEBHOOK - channel : dev - template : > - {{#success build.status}} - :large_green_circle: :package: *${DRONE_COMMIT_MESSAGE}* - {{build.link}} ({{build.branch}}) by {{build.author}} - {{else}} - :red_circle: :package: {{build.link}} ({{build.branch}}) by {{build.author}} - {{/success}} - when : - status : - - failure - - success - depends_on : - - publish-snapshot-jar - - publish-release-jar - ---- - -kind : pipeline -name : DockerImagePublishing -type : docker - -trigger : - event : - - push - - tag - -depends_on : - - ArtifactsPublishing - -volumes : - - name : m2cache - host : - path : /app/.m2 - -steps : - - name : package-jar - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - volumes : - - name : m2cache - path : /root/.m2 - environment : - DEPLOYER_USERNAME : - from_secret : DEPLOYER_USERNAME - DEPLOYER_PASSWORD : - from_secret : DEPLOYER_PASSWORD - commands : - - mvn package -Dstyle.color=always -DskipTests -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true --batch-mode -s ../maven-settings.xml -Ddeployer.username=$DEPLOYER_USERNAME -Ddeployer.password=$DEPLOYER_PASSWORD - - - name : build-container-with-feature - depends_on : - - package-jar - image : plugins/docker - settings : - dockerfile : ./.drone/Dockerfile - context : ./ - storage_driver : vfs - username : - from_secret : DOCKER_USERNAME - password : - from_secret : DOCKER_PASSWORD - repo : know-how.download/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME} - registry : know-how.download - force_tag : true - build_args : - - BASE_IMAGE=know-how.download/jre:openjdk-21-slim-bookworm - - BUILD_VERSION=${DRONE_COMMIT} - tags : - - ${DRONE_BRANCH:22}-${CI_BUILD_NUMBER} - when : - branch : - include : - - "feature/containerized-*" - - - name : build-container-release-image - depends_on : - - package-jar - image : plugins/docker - settings : - dockerfile : ./.drone/Dockerfile - context : ./ - storage_driver : vfs - username : - from_secret : DOCKER_USERNAME - password : - from_secret : DOCKER_PASSWORD - repo : know-how.download/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME} - registry : know-how.download - force_tag : true - build_args : - - BASE_IMAGE=know-how.download/jre:openjdk-21-slim-bookworm - - BUILD_VERSION=${DRONE_COMMIT} - tags : - - ${DRONE_TAG} - - "latest" - when : - ref : - - "refs/tags/*" - ---- - -kind : pipeline -name : PromoteFeatureDeployment -type : docker -trigger : - event : - - promote - target : - - sit - ref : - - "refs/heads/feature/containerized-*" - -steps : - - name : deploy - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - environment : - HELM_CHARTS_REPOSITORY : - from_secret : HELM_CHARTS_REPOSITORY - commands : - - git clone $${HELM_CHARTS_REPOSITORY} charts && cd charts/${DRONE_REPO_NAME} - - kubectl version --output=yaml - - helm upgrade --install --atomic --wait --timeout 2m ${DRONE_REPO_NAME} ./ --values ./values.yaml --values ./${DRONE_DEPLOY_TO}-values.yaml --set image.tag=${DRONE_BRANCH:22}-${CI_PARENT_BUILD_NUMBER} -n ${DRONE_DEPLOY_TO}-env - - - name : notify-slack - image : plugins/slack - settings : - webhook : - from_secret : SLACK_WEBHOOK - channel : dev - template : > - {{#success build.status}} - :large_green_circle: :ship: *${DRONE_COMMIT_MESSAGE}* - {{build.link}} ({{build.branch}}) by {{build.author}} - {{else}} - :red_circle: :anchor: {{build.link}} ({{build.branch}}) by {{build.author}} - {{/success}} - when : - status : - - failure - - success - depends_on : - - deploy - ---- - -kind : pipeline -name : RollbackFeatureDeployment -type : docker -trigger : - event : - - rollback - target : - - sit - ref : - - "refs/heads/feature/containerized-*" - -steps : - - name : rollback - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - environment : - HELM_CHARTS_REPOSITORY : - from_secret : HELM_CHARTS_REPOSITORY - commands : - - git clone $${HELM_CHARTS_REPOSITORY} charts && cd charts/${DRONE_REPO_NAME} - - helm uninstall --wait --timeout 2m ${DRONE_REPO_NAME} -n ${DRONE_DEPLOY_TO}-env - ---- - -kind : pipeline -name : PromoteDeployment -type : docker -trigger : - event : - - promote - target : - - uat - - production - ref : - - "refs/tags/*" - -steps : - - name : deploy - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - environment : - HELM_CHARTS_REPOSITORY : - from_secret : HELM_CHARTS_REPOSITORY - commands : - - git clone $${HELM_CHARTS_REPOSITORY} charts && cd charts/${DRONE_REPO_NAME} - - kubectl version --output=yaml - - helm upgrade --install --atomic --wait --timeout 2m ${DRONE_REPO_NAME} ./ --values ./values.yaml --values ./${DRONE_DEPLOY_TO}-values.yaml --set image.tag=${DRONE_TAG} -n ${DRONE_DEPLOY_TO}-env - - - name : notify-slack - image : plugins/slack - settings : - webhook : - from_secret : SLACK_WEBHOOK - channel : dev - template : > - {{#success build.status}} - :large_green_circle: :ship: *${DRONE_COMMIT_MESSAGE}* - {{build.link}} ({{build.branch}}) by {{build.author}} - {{else}} - :red_circle: :anchor: {{build.link}} ({{build.branch}}) by {{build.author}} - {{/success}} - when : - status : - - failure - - success - depends_on : - - deploy - ---- - -kind : pipeline -name : RollbackDeployment -type : docker -trigger : - event : - - rollback - target : - - uat - - production - ref : - - "refs/tags/*" - -steps : - - name : rollback - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - environment : - HELM_CHARTS_REPOSITORY : - from_secret : HELM_CHARTS_REPOSITORY - commands : - - git clone $${HELM_CHARTS_REPOSITORY} charts && cd charts/${DRONE_REPO_NAME} - - helm uninstall --wait --timeout 2m ${DRONE_REPO_NAME} -n ${DRONE_DEPLOY_TO}-env - ---- - -kind : pipeline -name : ManualRelease -type : docker -trigger : - event : - - custom - branch : - - "develop" - - "*.*.x" - -volumes : - - name : m2cache - host : - path : /app/.m2 - -steps : - - name : create-release-tag - failure : ignore - image : know-how.download/svc-builder:openjdk-21-slim-bookworm - pull : if-not-exists - volumes : - - name : m2cache - path : /root/.m2 - commands : - - echo Prepare new version ${RELEASE_VERSION} - - export NEXT_SNAPSHOT=${SNAPSHOT_VERSION}-SNAPSHOT - - export GIT_AUTHOR_NAME="$${SVC_BUILD_GIT_USERNAME}" - - export GIT_AUTHOR_EMAIL=$${SVC_BUILD_GIT_EMAIL} - - export GIT_COMMITTER_NAME="$${SVC_BUILD_GIT_USERNAME}" - - export GIT_COMMITTER_EMAIL=$${SVC_BUILD_GIT_EMAIL} - - git remote set-url --push origin ${DRONE_GIT_SSH_URL} - - git checkout -b v${RELEASE_VERSION} - - mvn versions:set -DremoveSnapshot - - mvn versions:set -DnewVersion=${RELEASE_VERSION} - - mvn versions:update-parent - - >- - git commit -a -m "feat: bump version to $${RELEASE_VERSION}" - - git tag ${RELEASE_VERSION} && git push origin ${RELEASE_VERSION} - - echo "✅ Release tag ${RELEASE_VERSION} was created." - - sleep 10 - - git tag -d ${RELEASE_VERSION} && git checkout ${DRONE_COMMIT_BRANCH} && git branch -D v${RELEASE_VERSION} - - mvn versions:set -DnewVersion=$${NEXT_SNAPSHOT} - - mvn versions:update-parent -DallowSnapshots=true - - >- - git commit -a -m "feat: create new $${NEXT_SNAPSHOT}" - - git push origin ${DRONE_COMMIT_BRANCH} - - echo "✅ Started $${NEXT_SNAPSHOT}." - - echo "🚀 Good job, new version ${RELEASE_VERSION} was released successfully." diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 365d9c0..aed0934 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,9 @@ # Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates -version: 2 -updates: - - package-ecosystem: "maven" - directory: "/" # Location of package manifests - schedule: - interval: "weekly" +version : 2 +updates : + - package-ecosystem : "maven" + directory : "/" # Location of package manifests + schedule : + interval : "weekly" diff --git a/.github/workflows/check-commit-message.yml b/.github/workflows/check-commit-message.yml index 0647443..96396e9 100644 --- a/.github/workflows/check-commit-message.yml +++ b/.github/workflows/check-commit-message.yml @@ -9,7 +9,7 @@ on : - synchronize push : branches : - - "develop" + - "dev" - "feature/*" - "bugfix/*" - "improvement/*" @@ -28,7 +28,7 @@ jobs : with : pattern : '^(feat|fix|docs|style|refactor|perf|test|chore|build)(.+?)?: .+' flags : 'gm' - error : 'Your commit title did not follow semantic versioning. Please see https://github.com/uJarOrg/.github/blob/develop/SEMANTIC_COMMITS.md' + error : 'Your commit title did not follow semantic versioning. Please see https://github.com/IQKV/.github/blob/dev/SEMANTIC_COMMITS.md' - name : Check Line Length uses : gsactions/commit-message-checker@v2 with : diff --git a/.husky/pre-commit b/.husky/pre-commit index 1bffa43..c1344cb 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,7 +2,7 @@ current_branch=$(git rev-parse --abbrev-ref HEAD) -main_branch="(main|master|develop)" +main_branch="(main|master|dev|develop)" if [[ $current_branch =~ $main_branch ]]; then echo -e "\033[1;31m[ERROR] Please don't commit directly to $current_branch.\033[0m"; exit 1 diff --git a/.mvn/wrapper/.gitignore b/.mvn/wrapper/.gitignore deleted file mode 100644 index e72f5e8..0000000 --- a/.mvn/wrapper/.gitignore +++ /dev/null @@ -1 +0,0 @@ -maven-wrapper.jar diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index 1708393..0000000 --- a/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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 - * - * http://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. - */ - -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader -{ - private static final String WRAPPER_VERSION = "3.1.1"; - - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = - "https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/" + WRAPPER_VERSION - + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use instead of the - * default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main( String args[] ) - { - System.out.println( "- Downloader started" ); - File baseDirectory = new File( args[0] ); - System.out.println( "- Using base directory: " + baseDirectory.getAbsolutePath() ); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File( baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH ); - String url = DEFAULT_DOWNLOAD_URL; - if ( mavenWrapperPropertyFile.exists() ) - { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try - { - mavenWrapperPropertyFileInputStream = new FileInputStream( mavenWrapperPropertyFile ); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load( mavenWrapperPropertyFileInputStream ); - url = mavenWrapperProperties.getProperty( PROPERTY_NAME_WRAPPER_URL, url ); - } - catch ( IOException e ) - { - System.out.println( "- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'" ); - } - finally - { - try - { - if ( mavenWrapperPropertyFileInputStream != null ) - { - mavenWrapperPropertyFileInputStream.close(); - } - } - catch ( IOException e ) - { - // Ignore ... - } - } - } - System.out.println( "- Downloading from: " + url ); - - File outputFile = new File( baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH ); - if ( !outputFile.getParentFile().exists() ) - { - if ( !outputFile.getParentFile().mkdirs() ) - { - System.out.println( "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() - + "'" ); - } - } - System.out.println( "- Downloading to: " + outputFile.getAbsolutePath() ); - try - { - downloadFileFromURL( url, outputFile ); - System.out.println( "Done" ); - System.exit( 0 ); - } - catch ( Throwable e ) - { - System.out.println( "- Error downloading" ); - e.printStackTrace(); - System.exit( 1 ); - } - } - - private static void downloadFileFromURL( String urlString, File destination ) - throws Exception - { - if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null ) - { - String username = System.getenv( "MVNW_USERNAME" ); - char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray(); - Authenticator.setDefault( new Authenticator() - { - @Override - protected PasswordAuthentication getPasswordAuthentication() - { - return new PasswordAuthentication( username, password ); - } - } ); - } - URL website = new URL( urlString ); - ReadableByteChannel rbc; - rbc = Channels.newChannel( website.openStream() ); - FileOutputStream fos = new FileOutputStream( destination ); - fos.getChannel().transferFrom( rbc, 0, Long.MAX_VALUE ); - fos.close(); - rbc.close(); - } - -} diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..cb28b0e Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 61a2ef1..39a584e 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -6,7 +6,7 @@ # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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 @@ -14,5 +14,5 @@ # 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.6/apache-maven-3.8.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/README.md b/README.md index 3ab4d1f..86bad45 100644 --- a/README.md +++ b/README.md @@ -14,14 +14,13 @@ The following items should be installed in your system: * git command line tool (https://help.github.com/articles/set-up-git) * Your preferred IDE (IDEA preferably) - ### Running locally This application is a [Spring Boot](https://spring.io/guides/gs/spring-boot) application built using [Maven](https://spring.io/guides/gs/maven/). You can build a jar file and run it from the command line: ``` -git clone https://github.com/uJarOrg/sample-webflux-vaadin-chat.git +git clone https://github.com/KnowHowSpringBoot/sample-webflux-vaadin-chat.git cd sample-webflux-vaadin-chat ./mvnw package java -jar target/*.jar @@ -33,13 +32,12 @@ You might also want to use Maven's `spring-boot:run` goal - applications run in ./mvnw spring-boot:run -Dspring-boot.run.profiles=local -P production ``` - ### Working with Application in your IDE 1) On the command line ``` -git clone https://github.com/uJarOrg/sample-webflux-vaadin-chat.git +git clone https://github.com/KnowHowSpringBoot/sample-webflux-vaadin-chat.git ``` 2) Inside IDE @@ -49,7 +47,6 @@ Activate "local" profile in the Run settings or set it via environment variables. [instruction](https://stackoverflow.com/questions/38520638/how-to-set-spring-profile-from-system-variable) Wait to indexing completion and push the green "play" button. - ## Code conventions The code follows [Google Code Conventions](https://google.github.io/styleguide/javaguide.html). Code diff --git a/SEMANTIC_COMMITS.md b/SEMANTIC_COMMITS.md deleted file mode 100644 index bc1b47c..0000000 --- a/SEMANTIC_COMMITS.md +++ /dev/null @@ -1,35 +0,0 @@ -# Semantic Commit Messages - -See how a minor change to your commit message style can make you a better programmer. - -Format: `(): ` - -`` is optional - -## Example - -``` -feat: add hat wobble -^--^ ^------------^ -| | -| +-> Summary in present tense. -| -+-------> Type: chore, docs, feat, fix, refactor, style, or test. -``` - -More Examples: - -- `feat`: (new feature for the user, not a new feature for build script) -- `fix`: (bug fix for the user, not a fix to a build script) -- `docs`: (changes to the documentation) -- `style`: (formatting, missing semi colons, etc; no production code change) -- `refactor`: (refactoring production code, eg. renaming a variable) -- `test`: (adding missing tests, refactoring tests; no production code change) -- `chore`: (updating grunt tasks etc; no production code change) - -References: - -- https://www.conventionalcommits.org/ -- https://seesparkbox.com/foundry/semantic_commit_messages -- http://karma-runner.github.io/1.0/dev/git-commit-msg.html - diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 3126175..ebd3fc0 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -17,7 +17,7 @@ services : volumes : - ./src/main/docker/grafana/provisioning/:/etc/grafana/provisioning/ environment : - - GF_SECURITY_ADMIN_PASSWORD=admin + - GF_SECURITY_ADMIN_PASSWORD=changeme - GF_USERS_ALLOW_SIGN_UP=false - GF_INSTALL_PLUGINS=grafana-piechart-panel # On MacOS, remove next line and replace localhost by host.docker.internal in src/main/docker/prometheus/prometheus.yml and diff --git a/mvnw b/mvnw index eaa3d30..bbc4938 100755 --- a/mvnw +++ b/mvnw @@ -8,7 +8,7 @@ # "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 +# http://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 @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Maven Start Up Batch script +# Apache Maven Wrapper startup batch script, version 3.2.0 # # Required ENV vars: # ------------------ @@ -27,7 +27,6 @@ # # Optional ENV vars # ----------------- -# M2_HOME - location of maven2's installed home dir # MAVEN_OPTS - parameters passed to the Java VM when running Maven # e.g. to debug Maven itself, use # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 @@ -62,9 +61,9 @@ case "`uname`" in # See https://developer.apple.com/library/mac/qa/qa1170/_index.html if [ -z "$JAVA_HOME" ]; then if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" + JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME else - export JAVA_HOME="/Library/Java/Home" + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME fi fi ;; @@ -76,36 +75,8 @@ if [ -z "$JAVA_HOME" ] ; then fi fi -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` [ -n "$CLASSPATH" ] && @@ -114,8 +85,6 @@ fi # For Mingw, ensure paths are in UNIX format before anything is touched if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" [ -n "$JAVA_HOME" ] && JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" fi @@ -163,12 +132,9 @@ if [ -z "$JAVA_HOME" ] ; then echo "Warning: JAVA_HOME environment variable is not set." fi -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - # traverses directory structure from process work directory to filesystem root # first directory with .mvn subdirectory is considered project base directory find_maven_basedir() { - if [ -z "$1" ] then echo "Path not specified to find_maven_basedir" @@ -188,7 +154,7 @@ find_maven_basedir() { fi # end of workaround done - echo "${basedir}" + printf '%s' "$(cd "$basedir"; pwd)" } # concatenates all lines of a file @@ -198,11 +164,16 @@ concat_lines() { fi } -BASE_DIR=`find_maven_basedir "$(pwd)"` +BASE_DIR=$(find_maven_basedir "$(dirname $0)") if [ -z "$BASE_DIR" ]; then exit 1; fi +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi + ########################################################################################## # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central # This allows using the maven wrapper in projects that prohibit checking in binary data. @@ -216,16 +187,16 @@ else echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." fi if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" else - jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" fi while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; esac done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" + echo "Downloading from: $wrapperUrl" fi wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" if $cygwin; then @@ -233,42 +204,49 @@ else fi if command -v wget > /dev/null; then + QUIET="--quiet" if [ "$MVNW_VERBOSE" = true ]; then echo "Found wget ... using wget" + QUIET="" fi if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" fi + [ $? -eq 0 ] || rm -f "$wrapperJarPath" elif command -v curl > /dev/null; then + QUIET="--silent" if [ "$MVNW_VERBOSE" = true ]; then echo "Found curl ... using curl" + QUIET="" fi if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L fi - + [ $? -eq 0 ] || rm -f "$wrapperJarPath" else if [ "$MVNW_VERBOSE" = true ]; then echo "Falling back to using Java to download" fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" # For Cygwin, switch paths to Windows format before running javac if $cygwin; then + javaSource=`cygpath --path --windows "$javaSource"` javaClass=`cygpath --path --windows "$javaClass"` fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then if [ "$MVNW_VERBOSE" = true ]; then echo " - Compiling MavenWrapperDownloader.java ..." fi # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") + ("$JAVA_HOME/bin/javac" "$javaSource") fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ -e "$javaClass" ]; then # Running the downloader if [ "$MVNW_VERBOSE" = true ]; then echo " - Running MavenWrapperDownloader.java ..." @@ -282,16 +260,10 @@ fi # End of extension ########################################################################################## -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" # For Cygwin, switch paths to Windows format before running java if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` [ -n "$CLASSPATH" ] && @@ -311,6 +283,5 @@ exec "$JAVACMD" \ $MAVEN_OPTS \ $MAVEN_DEBUG_OPTS \ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" \ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd index abb7c32..4ff98a4 100644 --- a/mvnw.cmd +++ b/mvnw.cmd @@ -7,7 +7,7 @@ @REM "License"); you may not use this file except in compliance @REM with the License. You may obtain a copy of the License at @REM -@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM http://www.apache.org/licenses/LICENSE-2.0 @REM @REM Unless required by applicable law or agreed to in writing, @REM software distributed under the License is distributed on an @@ -18,13 +18,12 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script +@REM Apache Maven Wrapper startup batch script, version 3.2.0 @REM @REM Required ENV vars: @REM JAVA_HOME - location of a JDK home dir @REM @REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven @@ -120,10 +119,10 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B ) @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central @@ -134,11 +133,11 @@ if exist %WRAPPER_JAR% ( ) ) else ( if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" ) if "%MVNW_VERBOSE%" == "true" ( echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% + echo Downloading from: %WRAPPER_URL% ) powershell -Command "&{"^ @@ -146,7 +145,7 @@ if exist %WRAPPER_JAR% ( "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ "}" if "%MVNW_VERBOSE%" == "true" ( echo Finished downloading %WRAPPER_JAR% diff --git a/npmw b/npmw new file mode 100755 index 0000000..12a91e5 --- /dev/null +++ b/npmw @@ -0,0 +1,42 @@ +#!/bin/sh + +basedir=`dirname "$0"` + +if [ -f "$basedir/mvnw" ]; then + bindir="$basedir/target/node" + repodir="$basedir/target/node/node_modules" + installCommand="$basedir/mvnw -Pwebapp frontend:install-node-and-npm@install-node-and-npm" + + PATH="$basedir/$builddir/:$PATH" + NPM_EXE="$basedir/$builddir/node_modules/npm/bin/npm-cli.js" + NODE_EXE="$basedir/$builddir/node" +elif [ -f "$basedir/gradlew" ]; then + bindir="$basedir/build/node/bin" + repodir="$basedir/build/node/lib/node_modules" + installCommand="$basedir/gradlew npmSetup" +else + echo "Using npm installed globally" + exec npm "$@" +fi + +NPM_EXE="$repodir/npm/bin/npm-cli.js" +NODE_EXE="$bindir/node" + +if [ ! -x "$NPM_EXE" ] || [ ! -x "$NODE_EXE" ]; then + $installCommand || true +fi + +if [ -x "$NODE_EXE" ]; then + echo "Using node installed locally $($NODE_EXE --version)" + PATH="$bindir:$PATH" +else + NODE_EXE='node' +fi + +if [ ! -x "$NPM_EXE" ]; then + echo "Local npm not found, using npm installed globally" + npm "$@" +else + echo "Using npm installed locally $($NODE_EXE $NPM_EXE --version)" + $NODE_EXE $NPM_EXE "$@" +fi diff --git a/npmw.cmd b/npmw.cmd new file mode 100644 index 0000000..e45f868 --- /dev/null +++ b/npmw.cmd @@ -0,0 +1,31 @@ +@echo off + +setlocal + +set NPMW_DIR=%~dp0 + +if exist "%NPMW_DIR%mvnw.cmd" ( + set NODE_EXE=^"^" + set NODE_PATH=%NPMW_DIR%target\node\ + set NPM_EXE=^"%NPMW_DIR%target\node\npm.cmd^" + set INSTALL_NPM_COMMAND=^"%NPMW_DIR%mvnw.cmd^" -Pwebapp frontend:install-node-and-npm@install-node-and-npm +) else ( + set NODE_EXE=^"%NPMW_DIR%build\node\bin\node.exe^" + set NODE_PATH=%NPMW_DIR%build\node\bin\ + set NPM_EXE=^"%NPMW_DIR%build\node\lib\node_modules\npm\bin\npm-cli.js^" + set INSTALL_NPM_COMMAND=^"%NPMW_DIR%gradlew.bat^" npmSetup +) + +if not exist %NPM_EXE% ( + call %INSTALL_NPM_COMMAND% +) + +if exist %NODE_EXE% ( + Rem execute local npm with local node, whilst adding local node location to the PATH for this CMD session + endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NODE_EXE% %NPM_EXE% %* +) else if exist %NPM_EXE% ( + Rem execute local npm, whilst adding local npm location to the PATH for this CMD session + endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NPM_EXE% %* +) else ( + call npm %* +) diff --git a/package.json b/package.json index 1704e09..cb398bb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "sample-webflux-vaadin-chat", + "name": "@know-how-spring-boot/sample-webflux-vaadin-chat", "version": "23.0.0", "description": "Provide an optional Git commit hooks.", "private": true, diff --git a/pom.xml b/pom.xml index 6af7cf4..67023d3 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - org.ujar + dev.knowhowto sample-webflux-vaadin-chat 23.0.0-SNAPSHOT jar @@ -18,12 +18,12 @@ - uJar Bootcamp - https://www.ujar.org + KnowHowSpringBoot Bootcamp + https://knowhowto.dev - 1 + dimdnk Dima Denysenko coding@dimdnk.com @@ -33,7 +33,7 @@ - org.ujar.boot + org.iqkv.boot boot-parent-pom 23.0.0-SNAPSHOT @@ -46,7 +46,7 @@ **/*Config*.java,**/*Properties.java,**/*Test.java,**/Test*.java false false - org.ujar.webfluxvaadinchat.WebfluxVaadinChatApplication + dev.knowhowto.webfluxvaadinchat.WebfluxVaadinChatApplication @@ -55,7 +55,7 @@ spring-boot-starter-webflux - org.ujar.boot + org.iqkv.boot boot-starter-observability diff --git a/src/main/docker/prometheus/prometheus.yml b/src/main/docker/prometheus/prometheus.yml index 462f09f..2696564 100644 --- a/src/main/docker/prometheus/prometheus.yml +++ b/src/main/docker/prometheus/prometheus.yml @@ -1,4 +1,4 @@ -# Sample global config for monitoring uJar applications +# Sample global config for monitoring KnowHowSpringBoot applications global : scrape_interval : 15s # By default, scrape targets every 15 seconds. evaluation_interval : 15s # By default, scrape targets every 15 seconds. @@ -7,7 +7,7 @@ global : # Attach these labels to any time series or alerts when communicating with # external systems (federation, remote storage, Alertmanager). external_labels : - monitor : 'ujar' + monitor : 'knowhowto' # A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. diff --git a/src/main/java/org/ujar/webfluxvaadinchat/ChatService.java b/src/main/java/dev/knowhowto/webfluxvaadinchat/ChatService.java similarity index 94% rename from src/main/java/org/ujar/webfluxvaadinchat/ChatService.java rename to src/main/java/dev/knowhowto/webfluxvaadinchat/ChatService.java index 38c64ee..c9a46a0 100644 --- a/src/main/java/org/ujar/webfluxvaadinchat/ChatService.java +++ b/src/main/java/dev/knowhowto/webfluxvaadinchat/ChatService.java @@ -1,4 +1,4 @@ -package org.ujar.webfluxvaadinchat; +package dev.knowhowto.webfluxvaadinchat; import java.time.Instant; diff --git a/src/main/java/org/ujar/webfluxvaadinchat/ChatView.java b/src/main/java/dev/knowhowto/webfluxvaadinchat/ChatView.java similarity index 96% rename from src/main/java/org/ujar/webfluxvaadinchat/ChatView.java rename to src/main/java/dev/knowhowto/webfluxvaadinchat/ChatView.java index 49fb8d7..6022d4b 100644 --- a/src/main/java/org/ujar/webfluxvaadinchat/ChatView.java +++ b/src/main/java/dev/knowhowto/webfluxvaadinchat/ChatView.java @@ -1,4 +1,4 @@ -package org.ujar.webfluxvaadinchat; +package dev.knowhowto.webfluxvaadinchat; import jakarta.annotation.security.PermitAll; import java.util.ArrayList; diff --git a/src/main/java/org/ujar/webfluxvaadinchat/LoginView.java b/src/main/java/dev/knowhowto/webfluxvaadinchat/LoginView.java similarity index 88% rename from src/main/java/org/ujar/webfluxvaadinchat/LoginView.java rename to src/main/java/dev/knowhowto/webfluxvaadinchat/LoginView.java index 36f69f7..f341429 100644 --- a/src/main/java/org/ujar/webfluxvaadinchat/LoginView.java +++ b/src/main/java/dev/knowhowto/webfluxvaadinchat/LoginView.java @@ -1,4 +1,4 @@ -package org.ujar.webfluxvaadinchat; +package dev.knowhowto.webfluxvaadinchat; import com.vaadin.flow.component.login.LoginForm; import com.vaadin.flow.component.orderedlayout.VerticalLayout; diff --git a/src/main/java/org/ujar/webfluxvaadinchat/Message.java b/src/main/java/dev/knowhowto/webfluxvaadinchat/Message.java similarity index 68% rename from src/main/java/org/ujar/webfluxvaadinchat/Message.java rename to src/main/java/dev/knowhowto/webfluxvaadinchat/Message.java index 0b22488..2b246e6 100644 --- a/src/main/java/org/ujar/webfluxvaadinchat/Message.java +++ b/src/main/java/dev/knowhowto/webfluxvaadinchat/Message.java @@ -1,4 +1,4 @@ -package org.ujar.webfluxvaadinchat; +package dev.knowhowto.webfluxvaadinchat; import java.time.Instant; diff --git a/src/main/java/org/ujar/webfluxvaadinchat/SecurityConfiguration.java b/src/main/java/dev/knowhowto/webfluxvaadinchat/SecurityConfiguration.java similarity index 96% rename from src/main/java/org/ujar/webfluxvaadinchat/SecurityConfiguration.java rename to src/main/java/dev/knowhowto/webfluxvaadinchat/SecurityConfiguration.java index 0908bb2..c842c55 100644 --- a/src/main/java/org/ujar/webfluxvaadinchat/SecurityConfiguration.java +++ b/src/main/java/dev/knowhowto/webfluxvaadinchat/SecurityConfiguration.java @@ -1,4 +1,4 @@ -package org.ujar.webfluxvaadinchat; +package dev.knowhowto.webfluxvaadinchat; import java.util.Set; diff --git a/src/main/java/org/ujar/webfluxvaadinchat/WebfluxVaadinChatApplication.java b/src/main/java/dev/knowhowto/webfluxvaadinchat/WebfluxVaadinChatApplication.java similarity index 94% rename from src/main/java/org/ujar/webfluxvaadinchat/WebfluxVaadinChatApplication.java rename to src/main/java/dev/knowhowto/webfluxvaadinchat/WebfluxVaadinChatApplication.java index c09a363..679e6d7 100644 --- a/src/main/java/org/ujar/webfluxvaadinchat/WebfluxVaadinChatApplication.java +++ b/src/main/java/dev/knowhowto/webfluxvaadinchat/WebfluxVaadinChatApplication.java @@ -1,4 +1,4 @@ -package org.ujar.webfluxvaadinchat; +package dev.knowhowto.webfluxvaadinchat; import com.vaadin.flow.component.page.AppShellConfigurator; import com.vaadin.flow.component.page.Push; diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index caff6d3..0852456 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -15,7 +15,7 @@ spring : name : sample-webflux-vaadin-chat vaadin : - whitelisted-packages : com.vaadin,org.vaadin,org.ujar.webfluxvaadinchat + whitelisted-packages : com.vaadin,org.vaadin,dev.knowhowto.webfluxvaadinchat logging : pattern : @@ -64,7 +64,7 @@ management : metrics : export : step : 20s - enabled: true + enabled : true zipkin : tracing : endpoint : ${TEMPO_URL:http://localhost:9411/api/v2/spans} @@ -90,7 +90,7 @@ management : prometheus : enabled : true -ujar : +iqkv : build : description : '@project.description@' relative-path : ${SERVER_SERVLET_CONTEXT_PATH:/} diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt index 3dab991..a3696de 100644 --- a/src/main/resources/banner.txt +++ b/src/main/resources/banner.txt @@ -1,8 +1,3 @@ -${AnsiColor.GREEN} | | -${AnsiColor.GREEN} _ _ | | __ _ _ __ -${AnsiColor.GREEN} | | | | _ | | / _` | | '__| -${AnsiColor.GREEN} | |_| | | |__| | | (_| | | | -${AnsiColor.GREEN} \__,_| \____/ \__,_| |_| ${AnsiColor.BLUE} =============================== ${AnsiColor.BLUE} Chat application example ${AnsiColor.BLUE} Running Spring Boot ${spring-boot.version}