Conditional On Profiles

Create a Spring Bean only if All profiles are active.

Лицензия

Лицензия

Группа

Группа

io.github.shyamz-22
Идентификатор

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

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

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

0.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

Conditional On Profiles
Create a Spring Bean only if All profiles are active.
Ссылка на сайт

Ссылка на сайт

https://github.com/shyamz-22/conditional-profiles.git
Система контроля версий

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

https://github.com/shyamz-22/conditional-profiles.git

Скачать conditional

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

<!-- https://jarcasting.com/artifacts/io.github.shyamz-22/conditional/ -->
<dependency>
    <groupId>io.github.shyamz-22</groupId>
    <artifactId>conditional</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.shyamz-22/conditional/
implementation 'io.github.shyamz-22:conditional:0.0.2'
// https://jarcasting.com/artifacts/io.github.shyamz-22/conditional/
implementation ("io.github.shyamz-22:conditional:0.0.2")
'io.github.shyamz-22:conditional:jar:0.0.2'
<dependency org="io.github.shyamz-22" name="conditional" rev="0.0.2">
  <artifact name="conditional" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.shyamz-22', module='conditional', version='0.0.2')
)
libraryDependencies += "io.github.shyamz-22" % "conditional" % "0.0.2"
[io.github.shyamz-22/conditional "0.0.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter jar

test (1)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-test jar

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

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

Conditional Profiles

Build Status codecov MavenCentral License: MIT

Default Spring profile behavior

Creates the bean when Profile A OR B is active.

@Bean
@Profile("A", "B")
public ExampleBean exampleBean() {
  return new ExampleBean();
}

Conditional On Profiles

Creates the bean only when Profile A AND B are active.

@Bean
@ConditionalOnProfiles("A","B")
public ExampleBean exampleBean() {
  return new ExampleBean();
}

Installation

Gradle

compile 'io.github.shyamz-22:conditional:0.0.2'

Maven

<dependency>
    <groupId>io.github.shyamz-22</groupId>
    <artifactId>conditional</artifactId>
    <version>0.0.2</version>
</dependency>

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

Версия
0.0.2
unspecified