GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — better support for spring integration · astamuse/asta4d@cb310fa

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • asta4d-spring/src/main/java/com/astamuse/asta4d/misc/spring
    • Asta4dBeanNameGenerator.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎asta4d-spring/src/main/java/com/astamuse/asta4d/misc/spring/Asta4dBeanNameGenerator.java‎

Copy file name to clipboard
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.astamuse.asta4d.misc.spring;
2+
3+
import org.springframework.beans.factory.config.BeanDefinition;
4+
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
5+
6+
public class Asta4dBeanNameGenerator extends AnnotationBeanNameGenerator {
7+
8+
private String[] snippetSearchPathList;
9+
10+
@Override
11+
protected String buildDefaultBeanName(BeanDefinition definition) {
12+
if (snippetSearchPathList == null) {
13+
return super.buildDefaultBeanName(definition);
14+
}
15+
String clsName = definition.getBeanClassName();
16+
for (String s : snippetSearchPathList) {
17+
if (clsName.startsWith(s)) {
18+
return clsName.substring(s.length());
19+
}
20+
}
21+
return super.buildDefaultBeanName(definition);
22+
}
23+
24+
public void setSnippetSearchPathList(String... snippetSearchPathList) {
25+
this.snippetSearchPathList = snippetSearchPathList.clone();
26+
}
27+
28+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.