Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

spring-boot-patterns

БесплатноБез исполняемых скриптовНе проверен

Spring Boot patterns for Xeres including constructor injection, @Transactional boundaries, REST controllers with OpenAPI annotations, and reactive WebClient…

zapekот zapek★ 224 звезды на GitHub

Об этом скилле

Spring Boot Patterns for Xeres

Application Entry Point


@SpringBootApplication(scanBasePackageClasses = {
		io.xeres.app.XeresApplication.class,
		io.xeres.ui.UiStarter.class
})
public class XeresApplication
{
}

Service Patterns

Constructor Injection

Always use constructor injection. Dependencies are final.


@Service
public class ContactService
{
	private final ProfileService profileService;
	private final LocationService locationService;

	public ContactService(ProfileService profileService, LocationService locationService)
	{
		this.profileService = profileService;
		this.locationService = locationService;
	}
}

Transactional Boundaries


@Transactional(readOnly = true)
public List<Contact> getContacts()
{
}

@Transactional
public void saveContact(Contact contact)
{
}

Circular Dependencies

Use @Lazy annotation, but avoid them if possible:

public ContactService(@Lazy ProfileService profileService)
{
}

REST Controllers

OpenAPI Annotations


@RestController
@Tag(name = "Profiles", description = "Profile management")
public class ProfileController
{
	@GetMapping("/{id}")
	@Operation(summary = "Get profile by ID")
	@ApiResponse(responseCode = "200", description = "Profile found")
	public ResponseEntity<ProfileDTO> getProfile(@PathVariable long id)
	{
	}
}

Exception Handling

Use custom exceptions with appropriate HTTP status codes.

Reactive WebClient Clients (UI Module)


@Component
public class ProfileClient
{
	private WebClient webClient;

	@EventListener
	public void init(StartupEvent event)
	{
		webClient = webClientBuilder.clone()
				.baseUrl(RemoteUtils.getControlUrl() + PROFILES_PATH)
				.build();
	}

	public Mono<Profile> findById(long id)
	{
		return webClient.get()
				.uri("/{id}", id)
				.retrieve()
				.bodyToMono(Profile.class);
	}
}

Configuration Classes

Use @Configuration for feature-specific beans. Keep @Bean methods small and focused.

Testing Services

See junit-testing skill for testing patterns with mocks.

Установить spring-boot-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл spring-boot-patterns?

Spring Boot patterns for Xeres including constructor injection, @Transactional boundaries, REST controllers with OpenAPI annotations, and reactive WebClient usage in the UI module.

Как установить скилл spring-boot-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл spring-boot-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить spring-boot-patterns с