Сообщения

maven

  mvn dependency:tree -Dverbose -Dincludes='org.apache.lucene' find ~/.m2/ -name "*.lastUpdated" | xargs rm src:  https://stackoverflow.com/a/26974691/2910338 maven опцию --thread для параллельной сборки проекта mvn dependency:purge-local-repository mvn spring-boot:run -Dspring-boot.run.profiles=foo,bar [ERROR] After correcting the problems, you can resume the build with the command [ERROR]  mvn <args> -rf :afd-vtb-aaap-ora-calc java -jar spring boot profile https://stackoverflow.com/a/37439625/2910338   https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven https://stackoverflow.com/questions/30207842/add-external-library-jar-to-spring-boot-jar-internal-lib https://stackoverflow.com/questions/2065928/maven-2-assembly-with-dependencies-jar-under-scope-system-not-included https://www.apache-maven.ru/ ************************************* можно выкинуть пакеты из java 11*************************          <ex

docker

start downloaded container: docker start hash or name from docker ps -a docker build ./ -t findli/ubuntu_base:18_03_2023 ************ docker-compose:     build:       context: ./frontend - контекст это директория в которой будет искаться dockerfile       dockerfile: Dockerfile равнозначно:     build:       #context: ./frontend       dockerfile: frontend/Dockerfile ************ ************ ********** error:  when docker-compose up --force-recreate --build --remove-orphans langapp-back strconv.Atoi: parsing "": invalid syntax to fix: comment existing containers in docker-compose.yaml file. replace them by something else. then docker compose up --remove-orphans then revert suspicious containers in docker-conpose file then docker compose up will work. src: https://github.com/docker/compose-cli/issues/1537#issuecomment-1284828193  ********** ********** https://stackoverflow.com/a/52084817/2910338 docker-compose down was very important as I was seeing no changes despite restarting

@EnableWebMvc and LocalDateTime

@Configuration //@EnableWebMvc - if uncomment this then LocalDateTime will be as arrays public class WebConfig implements WebMvcConfigurer {

unix linux usefull commands; clear up disk space

df -h ncdu - check directory sizes ss -plunt for app and port list  clear log:  rm /var/log/btmp.* journalctl --disk-usage journalctl --vacuum-size=50M journalctl --verify nano /etc/systemd/journald.conf SystemMaxUse=50M SystemMaxFileSize=12M systemctl restart systemd-journald nano /etc/logrotate.conf daily rotate 1 https://unix.stackexchange.com/a/605809/346938 https://www.linuxuprising.com/2019/04/how-to-remove-old-snap-versions-to-free.html

elasticsearch howeaver

------------------------------- elasticsearch download zip elasticsearch.yml: # allow CORS requests from https://tauri.localhost http.cors.enabled: true http.cors.allow-origin: "https://tauri.localhost" # and if your cluster uses authorization: http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization action.auto_create_index: .monitoring*,.watches,.triggered_watches,.watcher-history*,.ml* roles.yml: # The default roles file is empty as the preferred method of defining roles is # through the API/UI. File based roles are useful in error scenarios when the # API based roles may not be available. admins:   cluster:     - all   indices:     - names:         - "*"       privileges:         - all devs:   cluster:     - manage   indices:     - names:         - "*"       privileges:         - write         - delete         - create_index ------------------------------- ------------------------------- ------------------------------- kibana

consul

The downside with choosing the "first address" is that in the case of a docker network overlay, the first ip will likely be the wrong one. It would be better if it would bind to all ip's on a given interface, if you don't want it to bind to all of them then the ip should be specified. Perhaps something like: --bind eth0 to bind to all ip's on a given interface --bind eth0;10.0.0.0/16 bind to any ip on a given interface that matches the given cidr. --bind eth0;10.0.0.5 bind to a specific ip on a given interface --bind 10.0.0.5 bind to a specific ip regardless of interface --bind 10.0.0.0/16 bind to a given ip that matches a cidr regardless of interface

CORS another one

devtools console helps: Access to XMLHttpRequest at 'http://localhost:8443/api/essay/6' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Access to fetch at 'http://localhost:8443/graphql' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. login:109 Access to fetch at 'http://localhost:8443/graphql' from origin 'http://localhost:8082' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on th