samskivert / jmustache

A Java implementation of the Mustache templating language.
Other
834 stars 128 forks source link

Variable Issues on Windows 10 #118

Closed mkshin96 closed 9 months ago

mkshin96 commented 4 years ago

I was implementing a login with OAuth2 using Spring Boot2.1.x and jmustache1.14.(Referenced https://github.com/jojoldu/freelec-springboot2-webservice)

@GetMapping("/")
public String index(Model model) {
    model.addAttribute("posts", postsService.findAllDesc());
    SessionUser user = (SessionUser) httpSession.getAttribute("user"); 
    if (user != null) {
        model.addAttribute("userName", user.getName());
    }
    return "index";
}
<div class="row">
    <div class="col-md-6">
        <a href="/posts/save" role="button" class="btn btn-primary">글 등록</a>
        {{#userName}}
            Logged in as: <span id="user">{{userName}}</span>
            <a href="/logout" class="btn btn-info active" role="button">Logout</a>
        {{/userName}}
        {{^userName}}
            <a href="/oauth2/authorization/google" class="btn btn-success active" role="button">Google Login</a>
            <a href="/oauth2/authorization/naver" class="btn btn-secondary active" role="button">Naver Login</a>
        {{/userName}}
    </div>
</div>

I expected my name registered with Google would be bound(My name is 신무곤). But the result is image

In my opinion this seems to be a Windows variable bound. The reason is that image

How can I solve this? Thank you for reading!

agentgt commented 9 months ago

Sorry I'm fairly sure this is not a JMustache issue.

@samskivert I think we can close this issue.

It appears based on this comment it was resolved for them:

https://github.com/jojoldu/freelec-springboot2-webservice/issues/169#issuecomment-674488585