boxlang-runtime-spring-bootlisted
Install: claude install-skill ortus-boxlang/skills
# BoxLang with Spring Boot
## Overview
The `boxlang-spring-boot-starter` automatically configures BoxLang as a view
engine inside any Spring Boot 3.x application. Spring controllers return logical
view names, which Spring resolves to `.bxm` template files. Spring `Model`
attributes are available directly in templates via the BoxLang `variables` scope.
**Requirements:** Spring Boot 3.x · BoxLang 1.11.0+ · JDK 21+
---
## Dependency
### Gradle
```groovy
dependencies {
implementation "io.boxlang:boxlang-spring-boot-starter:1.0.0"
}
```
### Maven
```xml
<dependency>
<groupId>io.boxlang</groupId>
<artifactId>boxlang-spring-boot-starter</artifactId>
<version>1.0.0</version>
</dependency>
```
---
## Zero-Config Setup
Adding the dependency activates `BoxLangAutoConfiguration`, which registers:
- `BoxLangViewResolver` — resolves view names to `classpath:/templates/<name>.bxm`
- BoxLang runtime singleton (`BoxRuntime.getInstance()`)
No additional configuration is required to get started.
---
## Spring Controller
Return a logical view name (without path or extension) from a controller method:
```java
@Controller
public class HomeController {
@GetMapping("/")
public String home( Model model ){
model.addAttribute( "title", "Welcome" );
model.addAttribute( "message", "Hello from BoxLang!" );
return "home"; // → classpath:/templates/home.bxm
}
@GetMapping("/users")
public String users( Model model ){