package com.midm.app.converter; import com.mitac.cell.internet.http.UserAgent; import org.springframework.core.convert.converter.Converter; import org.springframework.stereotype.Component; /** * 【Spring 组件】{@code UserAgentConverter} * * 类职责: * * * 学习提示:先看类注释和 public 方法,再结合调用方理解它在整体流程中的位置。 */ @Component public class UserAgentConverter implements Converter { /** * 处理转换。 * * 实现要点:主要调用:new UserAgent。 * * @param source 参数 {@code source}({@code String}) * @return 处理结果 */ public UserAgent convert(String source) { return new UserAgent(source); } }