Change namespace to top.fatweb.oxygen.api
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package top.fatweb.oxygen.api.config
|
||||
|
||||
import org.apache.velocity.app.VelocityEngine
|
||||
import org.apache.velocity.runtime.RuntimeConstants
|
||||
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
|
||||
/**
|
||||
* Velocity engine configuration
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
class VelocityEngineConfig {
|
||||
@Bean
|
||||
fun velocityEngine() = VelocityEngine().apply {
|
||||
setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath")
|
||||
setProperty("classpath.resource.loader.class", ClasspathResourceLoader::class.java.name)
|
||||
init()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user