getProfileList();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/gen/com/explyt/spring/core/language/profiles/psi/ProfilesNamedElement.kt:
--------------------------------------------------------------------------------
1 | package com.explyt.spring.core.language.profiles.psi
2 |
3 | import com.intellij.psi.PsiNameIdentifierOwner
4 |
5 | interface ProfilesNamedElement : PsiNameIdentifierOwner
--------------------------------------------------------------------------------
/modules/spring-core/src/main/gen/com/explyt/spring/core/language/profiles/psi/ProfilesNotExpression.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package com.explyt.spring.core.language.profiles.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface ProfilesNotExpression extends PsiElement {
9 |
10 | @Nullable
11 | ProfilesAndExpression getAndExpression();
12 |
13 | @Nullable
14 | ProfilesNotExpression getNotExpression();
15 |
16 | @Nullable
17 | ProfilesOrExpression getOrExpression();
18 |
19 | @Nullable
20 | ProfilesProfile getProfile();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/gen/com/explyt/spring/core/language/profiles/psi/ProfilesProfile.java:
--------------------------------------------------------------------------------
1 | // This is a generated file. Not intended for manual editing.
2 | package com.explyt.spring.core.language.profiles.psi;
3 |
4 | import java.util.List;
5 | import org.jetbrains.annotations.*;
6 | import com.intellij.psi.PsiElement;
7 |
8 | public interface ProfilesProfile extends ProfilesNamedElement {
9 |
10 | @NotNull
11 | PsiElement getValue();
12 |
13 | @NotNull
14 | String getName();
15 |
16 | @NotNull
17 | PsiElement setName(@NotNull String newName);
18 |
19 | @NotNull
20 | PsiElement getNameIdentifier();
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/gen/com/explyt/spring/core/language/profiles/psi/impl/ProfilesNamedElementImpl.kt:
--------------------------------------------------------------------------------
1 | package com.explyt.spring.core.language.profiles.psi.impl
2 |
3 | import com.explyt.spring.core.language.profiles.psi.ProfilesNamedElement
4 | import com.intellij.extapi.psi.ASTWrapperPsiElement
5 | import com.intellij.lang.ASTNode
6 |
7 | abstract class ProfilesNamedElementImpl(node: ASTNode) :
8 | ASTWrapperPsiElement(node),
9 | ProfilesNamedElement
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/com/explyt/spring/core/icons/hibernate.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/com/explyt/spring/core/icons/hibernate_dark.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/com/explyt/spring/core/icons/readAccess.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/fileTemplates/spring-beans.xml.ft:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/CallBeanMethodFromSomeClass.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Inspection for invalid AOP Spring method call
4 |
5 |
6 |
7 | Do not call AOP methods from the same class.
8 |
9 | Example:
10 |
11 | @Component
12 | public class SpringComponent {
13 | public String method() {
14 | return transactionalMethod(); // "Warning: call AOP method from the same class"
15 | }
16 |
17 | @Transactional
18 | public String transactionalMethod() {
19 | return "Transactional";
20 | }
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/EnableAutoConfigureSpringFactoryInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Property org.springframework.boot.autoconfigure.EnableAutoConfiguration
is deprecated since spring-boot 2.7
4 | The setting must be moved to the file: META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
.
5 |
6 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/PsiFileReference.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Inspection for invalid file reference
4 |
5 |
6 |
7 | Unresolved file references in @Value\ResourceLoader\ResourceUtils
8 |
9 | Example:
10 |
11 | @Component
12 | public class FooConfiguration {
13 | // "Cannot resolve file foo.xml"
14 | public FooConfiguration(@Value("classpath:foo.xml") Resource value) {}
15 | }
16 |
17 |
18 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringAsyncReturnTypeInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Async Return Type Inspection
4 |
5 | Reports wrong return type for async methods.
6 |
7 | Example:
8 |
9 | @Configuration
10 | @Async
11 | public class SomeConfiguration {
12 | public void validReturnType() {}
13 |
14 | public String invalidReturnType() { // reports "Async method should return type of ''void'' or a ''Future'' inheritor"
15 | return "";
16 | }
17 | }
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringCacheableAnnotationInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | The @Cacheable, @CachePut, @CacheEvict, @CacheConfig inspection for cacheResolver/cacheManager/keyGenerator
8 |
9 |
10 | Example:
11 |
12 | // The inspection indicates a customResolver bean is exist
13 | @Cacheable(cacheResolver="customResolver")
14 | public class MyConfiguration {
15 | }
16 |
17 |
18 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringComponentScanInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | The @ComponentScan
inspection identifies incorrect package paths within annotations.
8 |
9 |
10 | Example:
11 |
12 | // The inspection indicates an unresolved package 'unknownPackage' here
13 | @ComponentScan("org.my.unknownPackage")
14 | @Configuration
15 | public class MyConfiguration {
16 |
17 | }
18 |
19 |
20 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringConditionalOnEmptyValueInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | ConditionalOnProperty value inspection
4 |
5 |
6 |
7 | Reports omitted attributes for @ConditionalOnProperty
annotation.
8 |
9 | Example:
10 | "The name or value attribute of @ConditionalOnProperty must be specified" will be reported on '@ConditionalOnProperty'
11 | annotation if none of mandatory attributes is specified
12 |
13 | @Component
14 | @ConditionalOnProperty
15 | public class MyComponent {
16 | }
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringConfigurationPropertiesContextInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Reports if the @ConfigurationProperties
class not correct configured in context
4 |
5 | - ConfigurationProperties class should be mark as @Configuration
6 | - Or must be declared in @EnableConfigurationProperties
7 | - Or must be located in package from @ConfigurationPropertiesScan
8 |
9 |
10 | The inspection triggers in classes that are annotated with @ConfigurationProperties
11 |
12 |
13 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringConfigurationPropertiesInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Reports invalid prefixes defined in the @ConfigurationProperties
annotations:
4 |
5 | - Empty prefix
6 | - Duplicate prefix
7 | - Prefix in notation other than kebab-case
8 |
9 |
10 | The inspection triggers in classes that are annotated with @ConfigurationProperties
11 |
12 |
13 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringContextConfigurationClasspath.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | @ContextConfiguration inspection for classpath
4 |
5 |
6 |
7 | Unresolved directories or files in @ContextConfiguration annotations.
8 |
9 | Example:
10 |
11 | @Configuration
12 | @ContextConfiguration(locations = "classpath:foo.xml") // "Cannot resolve file foo.xml"
13 | public class FooConfiguration {}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringContextConfigurationFile.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | @ContextConfiguration inspection for file
4 |
5 |
6 |
7 | Unresolved directories or files in @ContextConfiguration annotations.
8 |
9 | Example:
10 |
11 | @Configuration
12 | @ContextConfiguration(locations = "file:foo.xml") // "Cannot resolve file foo.xml"
13 | public class FooConfiguration {}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringDependsOnBeanInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | DependsOn Inspection
4 |
5 |
6 | The @DependsOn
inspection identifies incorrect bean reference.
7 |
8 |
9 | Example:
10 |
11 | @Component
12 | @DependsOn("beanNotFound") // reports "Incorrect bean reference at @DependsOn"
13 | class DependantComponent {
14 | }
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringEntityScanInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Inspection for Jpa Entity packages
4 |
5 |
6 | Spring Data Repository not enabled
7 |
8 | - check package for Jpa @Entity (default package scan & @EntityScan)
9 |
10 |
11 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringInterfaceCacheAnnotationsInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Cache on interface inspection
4 |
5 |
6 | Reports @Cache annotations declared on interface
7 |
8 | Example:
9 | "@Cache annotations shouldn't annotate interfaces" will be reported on 'MyInterface'
10 | "@Cache annotations should annotate concrete methods" will be reported on 'myMethod'
11 |
12 | @CacheConfig
13 | public interface MyInterface {
14 | @CacheEvict
15 | void myMethod();
16 | }
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringKotlinInternalBeanInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Kotlin internal bean methods inspection. Requires explicit specification of the bean name
4 |
5 | Examples:
6 |
7 | // correctly configured
8 | @Bean("testService")
9 | internal fun testService(): TestService {
10 | return Test3Service()
11 | }
12 |
13 | // warning - requires explicit specification of the bean name
14 | internal fun testService(): TestService {
15 | return Test3Service()
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringKotlinObjectInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Inspection for Kotlin object components
4 |
5 |
6 |
7 | It is not recommended to use a Kotlin object as a Spring Component.
8 | Spring create redundant instance for Kotlin object component and DI not worked.
9 |
10 | Example:
11 |
12 | @Component // "Warning"
13 | object SpringComponent {}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringPropertySourceClasspath.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | @PropertySource inspection for classpath
4 |
5 |
6 |
7 | Unresolved directories or files in @PropertySource and @TestPropertySource annotations.
8 |
9 | Example:
10 |
11 | @Configuration
12 | @PropertySource("classpath:foo.properties") // "Cannot resolve file foo.properties"
13 | public class FooPropertySource {}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringPropertySourceFile.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | @PropertySource inspection for file
4 |
5 |
6 |
7 | Unresolved directories or files in @PropertySource and @TestPropertySource annotations.
8 |
9 | Example:
10 |
11 | @Configuration
12 | @PropertySource("file:foo.properties") // "Cannot resolve file foo.properties"
13 | public class FooPropertySource {}
14 |
15 |
16 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/inspectionDescriptions/SpringValueAnnotationInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Reports incorrect property name in
5 | @Value
6 |
7 |
8 | Examples:
9 |
10 | //correctly configured
11 | @Value("${property.name}")
12 |
13 | //correctly configured
14 | @Value("#{property.name}")
15 |
16 | //warning should be @Value("${property.name}")
17 | @Value("property.name")
18 |
19 |
20 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreateConfigurationMetaDescriptionIntention/after.xml.template:
--------------------------------------------------------------------------------
1 | {
2 | "properties": [
3 | {
4 | "name": "some.key",
5 | "type": "java.lang.String",
6 | "description": "Description for some.key."
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreateConfigurationMetaDescriptionIntention/before.xml.template:
--------------------------------------------------------------------------------
1 | @ConfigurationProperties(prefix = "some")
2 | public class SomeProperties {
3 | private String key;
4 |
5 | public void setKey(String key) {
6 | this.key = key;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreateConfigurationMetaDescriptionIntention/description.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Creates property description from configuration properties in META-INF/additional-spring-configuration-metadata.json
4 |
5 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreatePropertiesMetaDescriptionIntention/after.xml.template:
--------------------------------------------------------------------------------
1 | {
2 | "properties": [
3 | {
4 | "name": "some.key",
5 | "type": "java.lang.String",
6 | "description": "Description for some.key."
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreatePropertiesMetaDescriptionIntention/before.xml.template:
--------------------------------------------------------------------------------
1 | some.key=value
2 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreatePropertiesMetaDescriptionIntention/description.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Creates property description from .properties
configuration file in META-INF/additional-spring-configuration-metadata.json
4 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreateYamlMetaDescriptionIntention/after.xml.template:
--------------------------------------------------------------------------------
1 | {
2 | "properties": [
3 | {
4 | "name": "some.key",
5 | "type": "java.lang.String",
6 | "description": "Description for some.key."
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreateYamlMetaDescriptionIntention/before.xml.template:
--------------------------------------------------------------------------------
1 | some:
2 | key: value
--------------------------------------------------------------------------------
/modules/spring-core/src/main/resources/intentionDescriptions/CreateYamlMetaDescriptionIntention/description.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Creates property description from .yaml
configuration file in META-INF/additional-spring-configuration-metadata.json
4 |
5 |
6 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/completion/properties/MyConfig.java:
--------------------------------------------------------------------------------
1 | import org.springframework.context.annotation.Configuration;
2 | import org.springframework.context.annotation.PropertySource;
3 |
4 | @Configuration
5 | @PropertySource("classpath:configuration-dir/abc.properties")
6 | public class MyConfig {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/completion/properties/WeekEnum.java:
--------------------------------------------------------------------------------
1 | package src;
2 |
3 | public enum WeekEnum{
4 | MONDAY,
5 | TUESDAY,
6 | WEDNESDAY,
7 | THURSDAY,
8 | FRIDAY,
9 | SATURDAY,
10 | SUNDAY
11 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/completion/properties/my-config.properties:
--------------------------------------------------------------------------------
1 | logleve
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/asyncReturnType/src/com/AsyncConfiguration.java:
--------------------------------------------------------------------------------
1 | package com;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.scheduling.annotation.Async;
5 |
6 | import java.util.concurrent.CompletableFuture;
7 |
8 | @Configuration
9 | @Async
10 | public class AsyncConfiguration {
11 | public void validReturnTypeVoid() {
12 | }
13 |
14 | public CompletableFuture validReturnTypeFuture() {
15 | return null
16 | }
17 |
18 | public String invalidReturnType() {
19 | return "";
20 | }
21 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/autowired/src/TestInjectBean.java:
--------------------------------------------------------------------------------
1 | package autowired
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.context.ApplicationContext;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | class TestInjectBean {
9 | @Autowired
10 | ApplicationContext context;
11 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/autowired/src/component_scan/Main.java:
--------------------------------------------------------------------------------
1 | package component_scan;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 |
5 | @ComponentScan
6 | public class Main {
7 | public static void main(String[] args) {
8 |
9 | }
10 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/autowired/src/component_scan/constructor/BarBean.java:
--------------------------------------------------------------------------------
1 | package component_scan.constructor;
2 |
3 | public class BarBean {
4 | }
5 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/cacheOnInterface/src/com/CacheOnInterface.java:
--------------------------------------------------------------------------------
1 | package com;
2 |
3 | import org.springframework.cache.annotation.CacheConfig;
4 | import org.springframework.cache.annotation.CacheEvict;
5 |
6 | @CacheConfig
7 | public interface CacheOnInterface {
8 | @CacheEvict
9 | void someMethod();
10 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/componentScan/src/com/1/3/1.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/inspection/componentScan/src/com/1/3/1.java
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/componentScan/src/com/2/4/1.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/inspection/componentScan/src/com/2/4/1.java
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/componentScan/src/com/2/5/1.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/inspection/componentScan/src/com/2/5/1.java
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/properties/src/resources/application.properties:
--------------------------------------------------------------------------------
1 | main.enabled=not_false
2 | main.enabled-primitive=not_false
3 | main.max-integer-value=5.6
4 | main.max-double-value=false
5 | main.max-number-value=test
6 | main.max-connections=1
7 | main.array-integer=1, e3
8 | main.contexts.simple1=wrong
9 | main.contexts.simple2=22
10 | main.list-not-integer[0]=error
11 | main.addresses[0]=12345678
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/propertyCreateFile/src/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.example.Class1 \
2 | com.example.Class2
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/propertyMoveToFile/src/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.example.Class1 \
2 | com.example.Class2
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/propertyMoveToFile/src/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.example.Class3
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/propertyRemove/src/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/suppresses/testConfiguration/expected.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/inspection/yaml/src/resources/application.yaml:
--------------------------------------------------------------------------------
1 | main:
2 | enabled: not_false
3 | enabled-primitive: not_false
4 | max-integer-value: 5.6
5 | max-double-value: false
6 | max-number-value: test
7 | max-connections: 1
8 | array-integer: 1, e3
9 | contexts:
10 | simple1: wrong
11 | simple2: 22
12 | list-not-integer[0]: error
13 | addresses[0]: 12345678
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/langinjection/AnnotatedWithBean.java:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component;
2 |
3 | @Component("annotatedWithBean")
4 | public class AnnotatedWithBean {
5 | }
6 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/langinjection/AnnotatedWithProfile.java:
--------------------------------------------------------------------------------
1 | import org.springframework.context.annotation.Configuration;
2 | import org.springframework.context.annotation.Profile;
3 |
4 | @Configuration
5 | @Profile("someProfileName")
6 | public class AnnotatedWithProfile {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/properties/TestComponent.java:
--------------------------------------------------------------------------------
1 | import org.springframework.beans.factory.annotation.Value;
2 | import org.springframework.stereotype.Component;
3 |
4 | @Component
5 | public class TestComponent {
6 | @Value(value = "${}")
7 | private String value;
8 | }
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/properties/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:postgres//localhost
2 | spring.datasource.username=root
3 | spring.datasource.password=root
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/properties/application.yaml:
--------------------------------------------------------------------------------
1 | spring:
2 | datasource:
3 | driver-class-name: org.h2.Driver
4 | url: jdbc:h2:mem:testdb?MODE=MYSQL
5 | username: sa
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/properties/rename/UserHandler.java:
--------------------------------------------------------------------------------
1 | import org.springframework.beans.factory.annotation.Value;
2 |
3 | public class UserHandler {
4 | @Value("${server.timing_new.minutes_to_next_claim:3}")
5 | private Integer fooFromProperties;
6 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/properties/rename/application.properties:
--------------------------------------------------------------------------------
1 | server.timing_new.minutes_to_next_claim=470
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/properties/rename/application.yaml:
--------------------------------------------------------------------------------
1 | server:
2 | timing_new:
3 | minutes_to_next_claim: 470
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/providers/linemarkers/beans/BeanUsagesClasses.java:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component;
2 | import org.springframework.beans.factory.annotation.Autowired;
3 |
4 | interface I {}
5 |
6 | class E {}
7 |
8 | @Component
9 | class A implements I {}
10 |
11 | @Component
12 | class C extends E implements I {}
13 |
14 | class B implements I {}
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/providers/linemarkers/beans/Foo.java:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component;
2 | import org.springframework.beans.factory.annotation.Autowired;
3 |
4 | @Component
5 | public class Foo {
6 |
7 | }
8 |
9 | @Component
10 | class Bar {
11 | @Autowired
12 | Foo foo;
13 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/providers/linemarkers/beans/inheritance/TestInheritance.java:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component;
2 |
3 | interface I {}
4 |
5 | @Component
6 | class E {}
7 |
8 | @Component
9 | class A extends E implements I {}
10 |
11 | @Component
12 | class B extends E implements I {}
13 |
14 | class C implements I {}
15 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/TestPropertySourceMultiResolve.java:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.context.annotation.PropertySource;
5 |
6 | @Configuration
7 | @PropertySource("/1/")
8 | public class TestPropertySourceMultiResolve {
9 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/1/application2.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/1/application2.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/1/application3.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/1/application3.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/2/abc/application4.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/2/abc/application4.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/2/def/application5.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/2/def/application5.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/3/application6.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/3/application6.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/3/application7.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/3/application7.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/4/application10.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/4/application10.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/4/application11.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/4/application11.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/4/application8.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/4/application8.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/file/properties/4/application9.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/java/reference/file/properties/4/application9.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/package/ComponentScanProject_File1.java:
--------------------------------------------------------------------------------
1 | package pack1.pack2.pack3;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.context.annotation.Configuration;
5 |
6 | @ComponentScan(basePackages = {"pack1.pack2.pack3"})
7 | @Configuration
8 | public class TestConfiguration {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/package/ComponentScanProject_File2.java:
--------------------------------------------------------------------------------
1 | package pack1.pack2.pack3_2;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.context.annotation.Configuration;
5 |
6 | @ComponentScan("pack1.pack2.")
7 | @Configuration
8 | public class TestConfiguration {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/package/ComponentScanProject_File3.java:
--------------------------------------------------------------------------------
1 | package pack1.pack2_2.pack3;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.context.annotation.Configuration;
5 |
6 | @ComponentScan({"pack1.*.pa"})
7 | @Configuration
8 | public class TestConfiguration {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/package/ComponentScanProject_File4.java:
--------------------------------------------------------------------------------
1 | package pack1.pack2_2.pack3_2;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.context.annotation.Configuration;
5 |
6 | @ComponentScan(basePackages = "pack1.*.pack3_2")
7 | @Configuration
8 | public class TestConfiguration {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/properties/FooBeanComponent.java:
--------------------------------------------------------------------------------
1 | package src;
2 |
3 | import org.springframework.stereotype.Component;
4 |
5 | @Component
6 | public class FooBeanComponent {
7 | private String username;
8 | private String password;
9 |
10 | public String getUsername() {
11 | return username;
12 | }
13 |
14 | public void setUsername(String username) {
15 | this.username = username;
16 | }
17 |
18 | public String getPassword() {
19 | return password;
20 | }
21 |
22 | public void setPassword(String password) {
23 | this.password = password;
24 | }
25 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/reference/properties/WeekEnum.java:
--------------------------------------------------------------------------------
1 | package src;
2 |
3 | public enum WeekEnum{
4 | MONDAY,
5 | TUESDAY,
6 | WEDNESDAY,
7 | THURSDAY,
8 | FRIDAY,
9 | SATURDAY,
10 | SUNDAY
11 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/app/AppBean.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @ComponentScan("com.outer")
7 | @Component
8 | public class AppBean {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/app/Application.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 |
7 | @SpringBootApplication
8 | public class Application {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/outer/OuterComponent.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import com.outerimport.OuterImport;
4 | import org.springframework.context.annotation.Import;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Import(OuterImport.class)
8 | @Component
9 | public class OuterComponent {
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/outer2/Outer2.java:
--------------------------------------------------------------------------------
1 | package com.outer2;
2 |
3 | public class Outer2 {
4 | }
5 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/outer3/Outer3.java:
--------------------------------------------------------------------------------
1 | package com.outer3;
2 |
3 | import org.springframework.stereotype.Component;
4 |
5 | @Component
6 | public class Outer3 {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/outerimport/OuterImport.java:
--------------------------------------------------------------------------------
1 | package com.outerimport;
2 |
3 |
4 | import com.outer.OuterComponent;
5 | import com.outer2.Outer2;
6 | import org.springframework.context.annotation.Bean;
7 | import org.springframework.stereotype.Component;
8 | import org.springframework.context.annotation.ComponentScan;
9 |
10 | @ComponentScan("com.outer3")
11 | public class OuterImport {
12 |
13 | @Bean public Outer2 outer2() { return new Outer2();}
14 |
15 | @Bean public OuterImportBean outerImportBean() { return new OuterImportBean();}
16 | }
17 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComplexWithComponentScan/com/outerimport/OuterImportBean.java:
--------------------------------------------------------------------------------
1 | package com.outerimport;
2 |
3 | public class OuterImportBean {
4 | }
5 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComponent/com/app/Application.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.context.annotation.Import;
6 |
7 |
8 | @SpringBootApplication
9 | @Import(com.outer.OuterImport.class)
10 | public class Application {
11 | }
12 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComponent/com/outer/OuterImport.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | public class OuterImport {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComponentWithBean/com/app/Application.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.context.annotation.Import;
6 |
7 |
8 | @SpringBootApplication
9 | @Import(com.outer.OuterImport.class)
10 | public class Application {
11 | }
12 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComponentWithBean/com/outer/OuterBean.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | public class OuterBean {
4 | }
5 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/importComponentWithBean/com/outer/OuterImport.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.stereotype.Component;
5 |
6 | public class OuterImport {
7 | @Bean public OuterBean outerBean() { return new OuterBean();}
8 | }
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScan/com/app/InnerScan.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan("com.inner")
8 | public class InnerScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScan/com/outer/OuterScan.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan
8 | public class OuterScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootApp/com/app/App.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 |
5 | @SpringBootApplication
6 | public class App {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootApp/com/app/InnerScan.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan("com.inner")
8 | public class InnerScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootApp/com/outer/OuterScan.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan
8 | public class OuterScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootAppClass/com/app/App.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 |
5 | @SpringBootApplication
6 | public class App {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootAppClass/com/app/InnerScan.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan(basePackageClasses = com.outer.OuterScan.class)
8 | public class InnerScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootAppClass/com/outer/OuterScan.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan
8 | public class OuterScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanAndSpringBootAppSomeClass/com/app/App.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 | import org.springframework.context.annotation.ComponentScan;
5 |
6 | @ComponentScan("com.inner")
7 | @SpringBootApplication
8 | public class App {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanRunConfigurationAppConfigConstructor/com/app/MainClass.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import com.outer.AppTestConfiguration;
4 | import com.outer.OuterComponent;
5 | import org.springframework.context.annotation.AnnotationConfigApplicationContext;
6 |
7 | public class MainClass {
8 | public static void main(String[] args) {
9 | try (var context = new AnnotationConfigApplicationContext(AppTestConfiguration.class)) {
10 | var bean = context.getBean(OuterComponent.class);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanRunConfigurationAppConfigConstructor/com/outer/AppTestConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.context.annotation.Import;
5 |
6 | @Configuration
7 | @Import(OuterComponent.class)
8 | public class AppTestConfiguration {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanRunConfigurationAppConfigConstructor/com/outer/OuterComponent.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.stereotype.Component;
4 | import org.springframework.context.annotation.ComponentScan;
5 |
6 | @Component
7 | @ComponentScan("com.outer")
8 | public class OuterComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanRunConfigurationAppConfigRegister/com/app/MainClass.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import com.outer.AppTestConfigurationRegister;
4 | import com.outer.OuterComponent;
5 | import org.springframework.context.annotation.AnnotationConfigApplicationContext;
6 |
7 | public class MainClass {
8 | public static void main(String[] args) {
9 | try (var context = new AnnotationConfigApplicationContext()) {
10 | context.register(AppTestConfigurationRegister.class)
11 | var bean = context.getBean(OuterComponent.class);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanRunConfigurationAppConfigRegister/com/outer/AppTestConfigurationRegister.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.context.annotation.Import;
5 |
6 | @Configuration
7 | @Import(OuterComponent.class)
8 | public class AppTestConfigurationRegister {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScanRunConfigurationAppConfigRegister/com/outer/OuterComponent.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.stereotype.Component;
4 | import org.springframework.context.annotation.ComponentScan;
5 |
6 | @Component
7 | @ComponentScan("com.outer")
8 | public class OuterComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScansAndSpringBootApp/com/app/App.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 |
5 | @SpringBootApplication
6 | public class App {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/java/service/packageScansAndSpringBootApp/com/app/InnerScan.java:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.context.annotation.ComponentScans;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | @ComponentScans({@ComponentScan("com.inner.scan1"), @ComponentScan("com.inner.scan2")})
9 | public class InnerScan {
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/completion/properties/ExternalSettings.kt:
--------------------------------------------------------------------------------
1 | open class ExternalSettings {
2 | var camelCaseLongPropertyVeryLongProperty: String = ""
3 | var yetProperty: String = ""
4 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/completion/properties/MyConfig.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.context.annotation.Configuration
2 | import org.springframework.context.annotation.PropertySource
3 |
4 | @Configuration
5 | @PropertySource("classpath:configuration-dir/abc.properties")
6 | open class MyConfig{
7 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/completion/properties/WeekEnum.kt:
--------------------------------------------------------------------------------
1 | package src
2 |
3 | enum class WeekEnum {
4 | MONDAY,
5 | TUESDAY,
6 | WEDNESDAY,
7 | THURSDAY,
8 | FRIDAY,
9 | SATURDAY,
10 | SUNDAY
11 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/completion/properties/my-config.properties:
--------------------------------------------------------------------------------
1 | logleve
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/autowired/src/component_scan/Main.kt:
--------------------------------------------------------------------------------
1 | package component_scan
2 |
3 | import org.springframework.context.annotation.ComponentScan
4 |
5 | @ComponentScan
6 | object Main {
7 | @JvmStatic
8 | fun main(args: Array) {
9 | }
10 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/autowired/src/component_scan/constructor/BarBean.kt:
--------------------------------------------------------------------------------
1 | package component_scan.constructor
2 |
3 | open class BarBean
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/cacheOnInterface/src/com/CacheOnInterface.kt:
--------------------------------------------------------------------------------
1 | package com
2 |
3 | import org.springframework.cache.annotation.CacheConfig
4 | import org.springframework.cache.annotation.CacheEvict
5 |
6 | @CacheConfig
7 | interface CacheOnInterface {
8 | @CacheEvict
9 | fun someMethod()
10 | }
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/componentScan/src/com/1/3/1.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/inspection/componentScan/src/com/1/3/1.kt
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/componentScan/src/com/2/4/1.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/inspection/componentScan/src/com/2/4/1.kt
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/componentScan/src/com/2/5/1.kt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/inspection/componentScan/src/com/2/5/1.kt
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/properties/src/resources/application.properties:
--------------------------------------------------------------------------------
1 | main.enabled=not_false
2 | main.enabled-primitive=not_false
3 | main.max-integer-value=5.6
4 | main.max-double-value=false
5 | main.max-number-value=test
6 | main.max-connections=1
7 | main.array-integer=1, e3
8 | main.contexts.simple1=wrong
9 | main.contexts.simple2=22
10 | main.list-not-integer[0]=error
11 | main.addresses[0]=12345678
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/propertyCreateFile/src/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.example.Class1 \
2 | com.example.Class2
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/propertyMoveToFile/src/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.example.Class1 \
2 | com.example.Class2
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/propertyMoveToFile/src/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | com.example.Class3
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/propertyRemove/src/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/suppresses/testConfiguration/expected.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/inspection/yaml/src/resources/application.yaml:
--------------------------------------------------------------------------------
1 | main:
2 | enabled: not_false
3 | enabled-primitive: not_false
4 | max-integer-value: 5.6
5 | max-double-value: false
6 | max-number-value: test
7 | max-connections: 1
8 | array-integer: 1, e3
9 | contexts:
10 | simple1: wrong
11 | simple2: 22
12 | list-not-integer[0]: error
13 | addresses[0]: 12345678
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/langinjection/AnnotatedWithBean.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component
2 |
3 | @Component("annotatedWithBean")
4 | class AnnotatedWithBean
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/langinjection/AnnotatedWithProfile.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.context.annotation.Configuration
2 | import org.springframework.context.annotation.Profile
3 |
4 | @Configuration
5 | @Profile("someProfileName")
6 | class AnnotatedWithProfile {
7 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/TestComponent.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.beans.factory.annotation.Value
2 | import org.springframework.stereotype.Component
3 |
4 | @Component
5 | open class TestComponent {
6 | @Value(value = "\${}")
7 | private val value: String = ""
8 | }
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/application.properties:
--------------------------------------------------------------------------------
1 | spring.datasource.url=jdbc:postgres//localhost
2 | spring.datasource.username=root
3 | spring.datasource.password=root
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/application.yaml:
--------------------------------------------------------------------------------
1 | spring:
2 | datasource:
3 | driver-class-name: org.h2.Driver
4 | url: jdbc:h2:mem:testdb?MODE=MYSQL
5 | username: sa
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/rename/LssConfigurationProperties.kt:
--------------------------------------------------------------------------------
1 | package com
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties
4 |
5 | @ConfigurationProperties(prefix = "lss")
6 | data class LssConfigurationProperties(
7 | var modeForStudio: String = "",
8 | var tokenForStudio: String = "",
9 | )
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/rename/UserHandler.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.beans.factory.annotation.Value
2 |
3 | class UserHandler {
4 | @Value("\${server.timing_new.minutes_to_next_claim}")
5 | private val minutesToNextClaim: Long = 470L
6 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/rename/application.properties:
--------------------------------------------------------------------------------
1 | server.timing_new.minutes_to_next_claim=470
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/properties/rename/application.yaml:
--------------------------------------------------------------------------------
1 | server:
2 | timing_new:
3 | minutes_to_next_claim: 470
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/providers/linemarkers/beans/BeanUsagesClasses.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component
2 |
3 | interface I
4 |
5 | open class E
6 |
7 | @Component
8 | class A : I
9 |
10 | @Component
11 | class C : E(), I
12 |
13 | class B : I
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/providers/linemarkers/beans/Foo.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component
2 | import org.springframework.beans.factory.annotation.Autowired
3 |
4 | @Component
5 | open class Foo
6 |
7 | @Component
8 | class Bar {
9 | @Autowired
10 | lateinit var foo: Foo
11 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/providers/linemarkers/beans/inheritance/TestInheritance.kt:
--------------------------------------------------------------------------------
1 | import org.springframework.stereotype.Component
2 |
3 | internal interface I
4 |
5 | @Component
6 | internal open class E
7 |
8 | @Component
9 | internal class A : E(), I
10 |
11 | @Component
12 | internal class B : E(), I
13 |
14 | internal class C : I
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/TestPropertySourceMultiResolve.kt:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.springframework.context.annotation.PropertySource
4 | import org.springframework.context.annotation.Configuration
5 |
6 | @Configuration
7 | @PropertySource("/1/")
8 | open class TestPropertySourceMultiResolve
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/1/application2.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/1/application2.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/1/application3.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/1/application3.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/2/abc/application4.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/2/abc/application4.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/2/def/application5.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/2/def/application5.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/3/application6.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/3/application6.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/3/application7.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/3/application7.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/4/application10.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/4/application10.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/4/application11.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/4/application11.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/4/application8.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/4/application8.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/file/properties/4/application9.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/kotlin/reference/file/properties/4/application9.properties
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/json/MainFooProperties.kt:
--------------------------------------------------------------------------------
1 | package com.boot
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties
4 | import org.springframework.context.annotation.Configuration
5 |
6 | @ConfigurationProperties(prefix = "main")
7 | @Configuration
8 | open class MainFooProperties {
9 | /**
10 | * max Sessions Per Connection
11 | */
12 | var maxSessionsPerConnection: Int = 765
13 |
14 | /**
15 | * Event listener
16 | */
17 | var eventListener: String? = null
18 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/package/ComponentScanProject_File1.kt:
--------------------------------------------------------------------------------
1 | package pack1.pack2.pack3
2 |
3 | import org.springframework.context.annotation.ComponentScan
4 | import org.springframework.context.annotation.Configuration
5 |
6 | @Configuration
7 | @ComponentScan(basePackages = ["pack1.pack2.pack3"])
8 | open class TestConfiguration
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/package/ComponentScanProject_File2.kt:
--------------------------------------------------------------------------------
1 | package pack1.pack2.pack3_2
2 |
3 | import org.springframework.context.annotation.ComponentScan
4 | import org.springframework.context.annotation.Configuration
5 |
6 | @Configuration
7 | @ComponentScan("pack1.pack2.")
8 | open class TestConfiguration
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/package/ComponentScanProject_File3.kt:
--------------------------------------------------------------------------------
1 | package pack1.pack2_2.pack3
2 |
3 | import org.springframework.context.annotation.ComponentScan
4 | import org.springframework.context.annotation.Configuration
5 |
6 | @Configuration
7 | @ComponentScan("pack1.*.pa")
8 | open class TestConfiguration
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/package/ComponentScanProject_File4.kt:
--------------------------------------------------------------------------------
1 | package pack1.pack2_2.pack3_2
2 |
3 | import org.springframework.context.annotation.ComponentScan
4 | import org.springframework.context.annotation.Configuration
5 |
6 | @Configuration
7 | @ComponentScan(basePackages = ["pack1.*.pack3_2"])
8 | open class TestConfiguration
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/properties/FooBeanComponent.kt:
--------------------------------------------------------------------------------
1 | package src;
2 |
3 | import org.springframework.stereotype.Component
4 |
5 | @Component
6 | class FooBeanComponent {
7 | var username: String? = null
8 | var password: String? = null
9 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/properties/LssConfigurationProperties.kt:
--------------------------------------------------------------------------------
1 | package com;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix = "lss")
6 | data class LssConfigurationProperties(
7 | var lssPlanConfiguration: LssPlanConfiguration = LssPlanConfiguration()
8 | }
9 |
10 | data class LssPlanConfiguration(
11 | var isExact: Boolean = false
12 | )
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/reference/properties/WeekEnum.kt:
--------------------------------------------------------------------------------
1 | package src
2 |
3 | enum class WeekEnum {
4 | MONDAY,
5 | TUESDAY,
6 | WEDNESDAY,
7 | THURSDAY,
8 | FRIDAY,
9 | SATURDAY,
10 | SUNDAY
11 | }
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/app/AppBean.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @ComponentScan("com.outer")
7 | @Component
8 | class AppBean
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/app/Application.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 |
7 | @SpringBootApplication
8 | class Application
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/outer/OuterComponent.kt:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import com.outerimport.OuterImport;
4 | import org.springframework.context.annotation.Import;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Import(com.outerimport.OuterImport::class)
8 | @Component
9 | class OuterComponent
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/outer2/Outer2.kt:
--------------------------------------------------------------------------------
1 | package com.outer2;
2 |
3 | class Outer2
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/outer3/Outer3.kt:
--------------------------------------------------------------------------------
1 | package com.outer3;
2 |
3 | import org.springframework.stereotype.Component;
4 |
5 | @Component
6 | class Outer3
7 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/outerimport/OuterImport.kt:
--------------------------------------------------------------------------------
1 | package com.outerimport;
2 |
3 |
4 | import com.outer.OuterComponent;
5 | import com.outer2.Outer2;
6 | import org.springframework.context.annotation.Bean;
7 | import org.springframework.stereotype.Component;
8 | import org.springframework.context.annotation.ComponentScan;
9 |
10 | @ComponentScan("com.outer3")
11 | class OuterImport {
12 |
13 | @Bean
14 | fun outer2(): Outer2 {
15 | return Outer2()
16 | }
17 |
18 | @Bean
19 | fun outerImportBean(): OuterImportBean {
20 | return OuterImportBean()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComplexWithComponentScan/com/outerimport/OuterImportBean.kt:
--------------------------------------------------------------------------------
1 | package com.outerimport;
2 |
3 | class OuterImportBean
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComponent/com/app/Application.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.context.annotation.Import;
6 |
7 |
8 | @SpringBootApplication
9 | @Import(com.outer.OuterImport::class)
10 | class Application
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComponent/com/outer/OuterImport.kt:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | class OuterImport {}
7 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComponentWithBean/com/app/Application.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 |
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.context.annotation.Import;
6 |
7 |
8 | @SpringBootApplication
9 | @Import(com.outer.OuterImport::class)
10 | class Application
11 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComponentWithBean/com/outer/OuterBean.kt:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | class OuterBean
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/importComponentWithBean/com/outer/OuterImport.kt:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.stereotype.Component;
5 |
6 | public class OuterImport {
7 | @Bean
8 | fun outerBean(): OuterBean {
9 | return OuterBean()
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScan/com/app/InnerScan.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan("com.inner")
8 | class InnerScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScan/com/outer/OuterScan.kt:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan
8 | public class OuterScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanAndSpringBootApp/com/app/App.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 |
5 | @SpringBootApplication
6 | public class App {
7 | }
8 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanAndSpringBootApp/com/app/InnerScan.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan("com.inner")
8 | public class InnerScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanAndSpringBootApp/com/outer/OuterScan.kt:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.ComponentScan;
4 | import org.springframework.stereotype.Component;
5 |
6 | @Component
7 | @ComponentScan
8 | public class OuterScan {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanAndSpringBootAppSomeClass/com/app/App.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication;
4 | import org.springframework.context.annotation.ComponentScan;
5 |
6 | @ComponentScan("com.inner")
7 | @SpringBootApplication
8 | public class App {
9 | }
10 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanRunConfigurationAppConfigConstructor/com/app/MainClass.kt:
--------------------------------------------------------------------------------
1 | package com.app;
2 |
3 | import com.outer.AppTestConfiguration;
4 | import com.outer.OuterComponent;
5 | import org.springframework.context.annotation.AnnotationConfigApplicationContext;
6 |
7 | class MainClass
8 |
9 | fun main() {
10 | AnnotationConfigApplicationContext(AppTestConfiguration::class)
11 | .use { context ->
12 | val bean = context.getBean(OuterComponent::class.java)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanRunConfigurationAppConfigConstructor/com/outer/AppTestConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.context.annotation.Import;
5 |
6 | @Configuration
7 | @Import(OuterComponent.class)
8 | public class AppTestConfiguration {}
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/kotlin/service/packageScanRunConfigurationAppConfigConstructor/com/outer/OuterComponent.java:
--------------------------------------------------------------------------------
1 | package com.outer;
2 |
3 | import org.springframework.stereotype.Component;
4 | import org.springframework.context.annotation.ComponentScan;
5 |
6 | @Component
7 | @ComponentScan("com.outer")
8 | public class OuterComponent {}
9 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/BracedValue.profiles:
--------------------------------------------------------------------------------
1 | (someValue)
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/BracedValue.txt:
--------------------------------------------------------------------------------
1 | Profiles File(0,11)
2 | PsiElement(ProfilesTokenType.()('(')(0,1)
3 | ProfilesProfileImpl(PROFILE)(1,10)
4 | PsiElement(ProfilesTokenType.value)('someValue')(1,10)
5 | PsiElement(ProfilesTokenType.))(')')(10,11)
6 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/Empty.profiles:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/explyt/spring-plugin/f5cee707367993e92ac1843c60f3dd83c952e65e/modules/spring-core/testdata/psi/Empty.profiles
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/Empty.txt:
--------------------------------------------------------------------------------
1 | Profiles File(0,0)
2 | PsiErrorElement:, , ProfilesTokenType.!, ProfilesTokenType.( or ProfilesTokenType.value expected(0,0)
3 |
4 |
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/EmptyBraces.profiles:
--------------------------------------------------------------------------------
1 | ()
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/EmptyBraces.txt:
--------------------------------------------------------------------------------
1 | Profiles File(0,2)
2 | PsiElement(ProfilesTokenType.()('(')(0,1)
3 | PsiErrorElement:, , ProfilesTokenType.! or ProfilesTokenType.value expected, got ')'(1,2)
4 | PsiElement(ProfilesTokenType.))(')')(1,2)
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/MixedOperations.profiles:
--------------------------------------------------------------------------------
1 | foo & bar | bla
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/MixedOperations.txt:
--------------------------------------------------------------------------------
1 | Profiles File(0,15)
2 | ProfilesAndExpressionImpl(AND_EXPRESSION)(0,9)
3 | ProfilesProfileImpl(PROFILE)(0,3)
4 | PsiElement(ProfilesTokenType.value)('foo')(0,3)
5 | PsiElement(ProfilesTokenType.&)('&')(4,5)
6 | ProfilesProfileImpl(PROFILE)(6,9)
7 | PsiElement(ProfilesTokenType.value)('bar')(6,9)
8 | PsiErrorElement:ProfilesTokenType.& expected, got '|'(10,11)
9 | PsiElement(ProfilesTokenType.|)('|')(10,11)
10 | PsiElement(ProfilesTokenType.value)('bla')(12,15)
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/Nested.profiles:
--------------------------------------------------------------------------------
1 | !(foo | ba | (bar & !bla))
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/Value.profiles:
--------------------------------------------------------------------------------
1 | someValue
--------------------------------------------------------------------------------
/modules/spring-core/testdata/psi/Value.txt:
--------------------------------------------------------------------------------
1 | Profiles File(0,9)
2 | ProfilesProfileImpl(PROFILE)(0,9)
3 | PsiElement(ProfilesTokenType.value)('someValue')(0,9)
--------------------------------------------------------------------------------
/modules/spring-data/src/main/resources/inspectionDescriptions/SpringDataEnableInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Inspection for Spring Data repository enabled
4 |
5 |
6 | Spring Data Repository not enabled
7 |
8 | - check spring data property - spring.data.jpa.repositories.enabled
9 | - check package for repositories (default package scan & @EnableJpaRepositories)
10 |
11 |
12 |
--------------------------------------------------------------------------------
/modules/spring-data/src/main/resources/inspectionDescriptions/SpringDataMethodNameInspection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Reports Spring Data JPA Query Methods
5 | Spring
6 | Data JPA Query
7 |
8 |
9 | Example:
10 |
11 | interface JpaEntityRepository extends Repository<JpaEntity, Long> {
12 | List<JpaEntity> findByNameAndId(String name, Long id);
13 | }
14 |
15 |
16 |
17 |
18 |