Code Monkey home page Code Monkey logo

ajax-qrcode-springboot's Introduction

🎮 ahu

(q=_=>( // This is a self-replicating program (the so-called Quine). RUN ME!
  {
    profile: {
      name: /^ahu(?:glajbclajep)?$/,
      birthdate: new Date("1997/3/12"),
      hobbies: ["programming", "gaming", "reading"],
    },
    accounts: {
      twitter: "https://twitter.com/ahuglajbclajep",
      github: "https://github.com/ahuglajbclajep",
      steam: "https://steamcommunity.com/id/ahuglajbclajep",
    },
    posts: {
      notes: "https://scrapbox.io/ahuglajbclajep",
      hobbies: "https://ahuglajbclajep.hatenadiary.jp",
    },
  }
,console.log(`(q=${q})()`)))()

ajax-qrcode-springboot's People

Contributors

ahuglajbclajep avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ajax-qrcode-springboot's Issues

Can't work gradle plugins DSL

gradlespringのドキュメントによると

plugins {
  id "org.springframework.boot" version "1.5.4.RELEASE"
}

だけでpluginのapplyまでやってくれるらしいが

group 'ahuglajbclajep.spring.boot'
version = '1.1.0'
buildscript {
    plugins {
        id "org.springframework.boot" version "1.5.4.RELEASE"
    }
}

としたところorg.springframework.bootプラグインの解決に失敗した

IEで$.ajaxが機能しない

おそらく

$.ajax({
  url: "create",
  type: "POST",
  contentType: "text/plain",
  data: text,
  xhr: function () {
    var xhr = new XMLHttpRequest();
    xhr.responseType = "blob";
    return xhr;
  }
})

とxhrを指定してるのが原因
ドキュメントにも

Defaults to the ActiveXObject when available (IE)

とある(IEにもXMLHttpRequestはあるはずだが…)

素直に素のJSで書くと動作するのでそのように対応する

createQRcodeの引数の扱いについて

nullはもちろん空文字でも生成する画像はない
nullに対するアプローチは

  • privateならnullがこないのは自明
    空文字はisEmpty()IllegalArgumentExceptionを投げるなどする
  • java.util.Optional<T>.orElseでデフォルト値でなどで処理を継続
  • null以外にもとりたくない値があるならIllegalArgumentExceptionを投げる
  • java.util.Objects.requireNonNullNullPointerExceptionを投げる
  • @NonNullを使う
    などが上げられる

ToDo

v2.0までにやりたいこと

bodyが日本語を受け付けない

bodyの時点でエンコードされたものになってしまうので正しいQRコードが生成されない
これによるとapplication/x-www-form-urlencodedだと手間っぽい
そもそも複数パラメーターをもらうためのものだし

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.