SoLong Application

An Application Harness Library

Лицензия

Лицензия

Группа

Группа

uk.co.solong
Идентификатор

Идентификатор

application
Последняя версия

Последняя версия

0.0.17
Дата

Дата

Тип

Тип

jar
Описание

Описание

SoLong Application
An Application Harness Library
Система контроля версий

Система контроля версий

https://github.com/danielburrell/application

Скачать application

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/uk.co.solong/application/ -->
<dependency>
    <groupId>uk.co.solong</groupId>
    <artifactId>application</artifactId>
    <version>0.0.17</version>
</dependency>
// https://jarcasting.com/artifacts/uk.co.solong/application/
implementation 'uk.co.solong:application:0.0.17'
// https://jarcasting.com/artifacts/uk.co.solong/application/
implementation ("uk.co.solong:application:0.0.17")
'uk.co.solong:application:jar:0.0.17'
<dependency org="uk.co.solong" name="application" rev="0.0.17">
  <artifact name="application" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.co.solong', module='application', version='0.0.17')
)
libraryDependencies += "uk.co.solong" % "application" % "0.0.17"
[uk.co.solong/application "0.0.17"]

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
io.github.classgraph : classgraph jar 4.2.0
org.apache.commons : commons-lang3 jar 3.9
org.springframework.boot : spring-boot-autoconfigure jar 2.1.6.RELEASE
org.springframework : spring-context jar 5.1.8.RELEASE
org.slf4j : slf4j-api jar 1.7.26

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Application is a library which provides a set of standard application and configuration classes based on common usage patterns and in particular for use with the spring framework.

Quickstart

Maven

<dependency>
    <groupId>uk.co.solong</groupId>
    <artifactId>application</artifactId>
    <version>0.0.18</version>
</dependency>

AutoAnnotationSpringBootApplication

We recommend you use the AutoAnnotationSpringBootApplication class to enable you to start a SpringBoot application by automatically searching for a @RootConfiguration annotated class.

Single RootConfiguration Example

Create your standard SpringConfig class and add @RootConfiguration in addition to the regular spring @Configuration annotation.

@Import({ PropertyPlaceholderConfig.class, ... })
@Configuration
@RootConfiguration
public class Config {

}

Then when you use the maven-assembly-plugin, simply provide AutoAnnotationApplication as the main class. No need to pass the name of the RootConfiguration class. This is useful since the pom file does not need refactoring should the package change or root configuration class be renamed.

<programs>
   <program>
      <mainClass>uk.co.solong.application.main.spring.java.AutoAnnotationSpringBootApplication</mainClass>
      <id>start</id>
      <jvmSettings>
         <initialMemorySize>20m</initialMemorySize>
         <maxMemorySize>256m</maxMemorySize>
         <maxStackSize>128m</maxStackSize>
         <systemProperties>
            <systemProperty>logback.configurationFile=logback-prod.xml</systemProperty>
            <systemProperty>APP_ENV=prod</systemProperty>
         </systemProperties>
      </jvmSettings>
   </program>
</programs>

That's it! Nothing more to do!

Advanced examples

More advanced examples (including handling multiple RootConfiguration classes in the same library/classpath can be found on [this advanced example page](Advanced Examples)


NamedAnnotationApplication

The NamedAnnotationApplication starts an application when given the fully qualified name of the Root configuration class as an explicit arg parameter. The class must exist, or the application will fail.

In the example below, the class com.company.config.Config is explicitly passed as a commandline argument in the maven assembler plugin.

package com.company.config;

@Import({ PropertyPlaceholderConfig.class, ... })
@Configuration
public class Config {

}
<programs>
    <program>
        <mainClass>uk.co.solong.application.main.spring.java.NamedAnnotationApplication</mainClass>
        <id>start</id>
        <commandLineArguments>
            <commandLineArgument>com.company.config.Config</commandLineArgument>
        </commandLineArguments>
        <jvmSettings>
            <initialMemorySize>20m</initialMemorySize>
            <maxMemorySize>256m</maxMemorySize>
            <maxStackSize>128m</maxStackSize>
            <systemProperties>
                <systemProperty>logback.configurationFile=logback-prod.xml</systemProperty>
                <systemProperty>APP_ENV=prod</systemProperty>
            </systemProperties>
        </jvmSettings>
    </program>
</programs>

Developer Guide

The developer guide explains how to setup the developer environment. The sdlc guide page describes how to cut a release, publish artifacts to the central repository or github.

Версии библиотеки

Версия
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1