2022/07/04

@MockkBean SpykBean

 @MockkBeanではevery文で定義しなかった関数は何も返さない関数に置き換わりますが、

@SpykBeanではevery文で定義しなかった関数はそのままオリジナルの関数の定義を引き継ぎます。

2022/06/29

What is username and password when starting Spring Boot with Tomcat?

user name: user

password: 

2022-06-29 17:17:09.586  WARN 1242 --- [           main] .s.s.UserDetailsServiceAutoConfiguration :


Using generated security password: 7b324ed9-1181-461e-bd5e-0a26ebdd3013


This generated password is for development use only. Your security configuration must be updated before running your application in production.




curl post json file

 curl -X POST -H 'Content-type:application/json' \

  --data-binary @some.json some_url

2022/02/28

2022/02/20

mac java version

久しぶりにJavaを触った。

many many jdks ...so how to mange so many jdks


  • show jdks version on your mac pc
    /usr/libexec/java_home -V

  • env is a good idea. 
    • python->pyenv
    • node->nodenv
    • ruby->rbenv
    • golang->gvm
    • java->jenv

  • install jenv
      brew install jenv
     export JENV_ROOT="$HOME/.jenv"
    echo 'eval "$(jenv init -)"' >> ~/.bash_profile
    source ~/.bash_profile
    jenv doctor

  • add jdk path to jenv
    jenv add /Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home

  • use some version
    jenv local 11     

2022/02/16

Gradle The JavaExec.main property has been deprecated

deprecated gradle features were used in this build, making it incompatible with gradle 8.0.


 => add ↓ to gradle.properties

org.gradle.warning.mode=all


then 

he JavaExec.main property has been deprecated


change build.gradle


plugins {
id "application"
}
apply plugin : "java"
application {
mainClass = 'xxx.xxx'
}

then 

gradle run