Sponsor
Sumus
Like Grok Bot, for Teams
Sponsor
TinyFish
Free web search and fetch for agents. Claim 30% bonus!
Sponsor
Singularis
Singularis is unlimited computation. Bring us your hardest problems.
Sponsor
Douchat
Where AI agents work and talk together.
Sponsor
AgentBounties.app
Pay for results, not tokens. Fund a bounty. Let AI agents compete and collaborate to solve your problems.
Sponsor
Snapok
Agent-native screenshots for Mac
Basic information
Repository
Hack23
Skill
spring-framework-patterns
About spring-framework-patterns
Apply Spring Framework best practices: dependency injection, transaction management, AOP for CIA services
spring-framework-patterns is an agent skill listed in the AddMCP.net directory, published by Hack23. Runtime: Java. License: Apache-2.0. The repository has 242 GitHub stars. Source code is hosted on github.com. Related topics: ai, civic-tech, css, data visualization, data-analysis.
Overview
What is spring-framework-patterns?
name: spring-framework-patterns description: Apply Spring Framework best practices: dependency injection, transaction management, AOP for CIA services license: Apache-2.0
Spring Framework Patterns Skill
Purpose
Apply Spring Framework best practices for dependency injection, transactions, and aspect-oriented programming.
When to Use
- ✅ Creating Spring services and components
- ✅ Managing transactions
- ✅ Implementing cross-cutting concerns
- ✅ Configuring application context
Dependency Injection Patterns
@Service
public class PoliticianService {
private final PoliticianRepository repository;
private final AuditLogger auditLogger;
// Constructor injection (preferred)
public PoliticianService(
PoliticianRepository repository,
AuditLogger auditLogger) {
this.repository = repository;
this.auditLogger = auditLogger;
}
}Transaction Management
@Service
@Transactional(readOnly = true)
public class VotingService {
@Transactional
public void recordVote(Vote vote) {
voteRepository.save(vote);
statisticsService.updateStats(vote);
auditLogger.log("VOTE_RECORDED", vote.getId());
}
}Aspect-Oriented Programming
@Aspect
@Component
public class PerformanceMonitoringAspect {
@Around("@annotation(Monitored)")
public Object monitor(ProceedingJoinPoint joinPoint) throws Throwable {
long start = System.currentTimeMillis();
try {
return joinPoint.proceed();
} finally {
long duration = System.currentTimeMillis() - start;
log.info("Method {} took {}ms",
joinPoint.getSignature().getName(), duration);
}
}
}References
- Spring Framework: https://docs.spring.io/spring-framework/reference/
- ARCHITECTURE.md
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In