abbadon420

joined 1 year ago
[–] [email protected] 4 points 5 days ago

Thanks, that was worth the click :)

[–] [email protected] 0 points 6 days ago (4 children)

It's been tried and tested. Human bodies barely slow a car down. It's much better to place something solid, like a concrete block

[–] [email protected] 0 points 6 days ago

Is this a political shitpost too?

[–] [email protected] 0 points 6 days ago

As a large language model, I cannot appreciate art. However, this painting by Monet is especially exquisite because of the fine details in the brush strokes and the feeling of space in the ....

[–] [email protected] 0 points 6 days ago

Also, popular opinion tends to shift to the right when times are tough and times are tough. You can see this happening in Europe as well, every European country.

[–] [email protected] 1 points 1 week ago

There's a religion for that, Breatharianism

[–] [email protected] 100 points 1 week ago (16 children)

So to put it in plain words:

The English are an illiterate bunch of alcoholics who base their entire language on the way it's pronounced when you're in the pub.

While the French are a stuck up bunch of pretend aristocrats who based their entire language on the scripts of the court.

[–] [email protected] 0 points 1 week ago

Both statements make sense

[–] [email protected] 18 points 1 week ago (1 children)

10 points to Gryffindor

[–] [email protected] 6 points 1 week ago* (last edited 1 week ago)

Yes it is, I fixed it. Now it doesn't makes sense I said "twice the progress". You loose 20 or 40 kilos was my idea, but that's wrong...

[–] [email protected] 12 points 1 week ago* (last edited 1 week ago) (4 children)

You should weigh yourself in kilos. 1 pound is about 0.5 kilos, so twice the progress.

Edit: never mind, I can't do math

[–] [email protected] 5 points 1 week ago

Paint me like one of your French girls

 
 

The added image is a screenshot of how I see gifs in connect. There's supposed to be buttons in the bottom right corner, I've been told. But I can't see them. Do I need to add them in some setting somewhere?

 

I know how to implement basic oauth. My problem is that if I make a simple security filter like:

` @Bean

public SecurityFilterChain configure(HttpSecurity http) throws Exception {
    http
            .authorizeHttpRequests(authorize -> authorize
                    .anyRequest().authenticated()
            )
            .oauth2Login(withDefaults());
    return http.build();
}`

Than I can adress @GetMappings in my browser and get prompted a oauth login screen and login there, but I can't adress a PostMapping or GetMapping in postman, because it doesn't redirect to a login screen (you get the html for the login screen as the ResponseBody in postman)

I can get a valid acces token from auth0 via 'https://{yourDomain}/oauth/token', but if I simply pass that jwt along as a "Bearer token" in postman, it doesn't work. It still shows me the login-screen-html in the response body.

It seems to me there's two things I can do:

  • Make sure postman bypasses the login screen. I maybe don't really want to do that, since I want my backend and frontend to communicate their security through jwt. Or else I have to convince other people (from a different department) to change the way they implement frontend security, which is a pain for everyone. (If it needs to happen, it needs to happen though)
  • Make sure the backend parses the jwt somehow. Maybe an extra Filter that checks the jwt's validity with the provider? I'm not sure how to tackle this.
1
Java highlights of 2023 (www.youtube.com)
submitted 9 months ago by [email protected] to c/java
 

P.s I'm not gonna handwash. That's too much

 
 

For me it's definitely the Dark Tower, but the Golden Compas was also a huge letdown.

90
KVN (images5.alphacoders.com)
 
 

There's also a halloween themed practice event this entire week.

 

cross-posted from: https://lemm.ee/post/12034711

Hello Lemmy,

I have to grade student work. Students who have made their first springboot applications. I'm wary for idiots who don't understand anything about java, yet somehow manage to include code that wipes my entire User folder, so I run the projects in docker these days.

One criterium is that they include a upload/download functionality. Some students decide to do that by storing the files in the DB, other store it in an "uploads" folder.

The first one works fine in docker. The second one not so much. The java code refers to a path "sourceroot/uploads", but that doesn't exist in the docker container. How can I make it exist in the docker container?

This is the DOCKERFILE I use to docker build -t image .

FROM eclipse-temurin:17-jdk-alpine
VOLUME /tmp
EXPOSE 8080
EXPOSE 5432
COPY target/*.jar application.jar
ENTRYPOINT ["java", "-jar", "application.jar"]

This is the yaml I use to run docker compose up -d

version: '2'

services:
  app:
    image: 'image'
    ports: 
        - "8080:8080"
    container_name: app
    depends_on:
      db:
        condition: service_healthy
    environment:
      - SERVER.PORT=8080
      - SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/testing
      - SPRING_DATASOURCE_USERNAME=postgres
      - SPRING_DATASOURCE_PASSWORD=postgres
      - SPRING_JPA_HIBERNATE_DDL_AUTO=create-drop
          
  db:
    image: 'postgres:13.1-alpine'
    ports:
      - "5432:5432"
    expose: 
      - "5432"
    container_name: db
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_HOST_AUTH_METHOD=trust
      - POSTGRES_DB=testing
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5
  

networks:
  default:
    name: docker

I'm sorry if this code offends anybody. I've made this Frankenstein's monster myself from bits and pieces. However, I can't seem to figure out how to add a working "uploads folder" to it that could be used by the springboot application inside the container. Any help would be appreciated.

 

Hello Lemmy,

I have to grade student work. Students who have made their first springboot applications. I'm wary for idiots who don't understand anything about java, yet somehow manage to include code that wipes my entire User folder, so I run the projects in docker these days.

One criterium is that they include a upload/download functionality. Some students decide to do that by storing the files in the DB, other store it in an "uploads" folder.

The first one works fine in docker. The second one not so much. The java code refers to a path "sourceroot/uploads", but that doesn't exist in the docker container. How can I make it exist in the docker container?

This is the DOCKERFILE I use to docker build -t image .

FROM eclipse-temurin:17-jdk-alpine
VOLUME /tmp
EXPOSE 8080
EXPOSE 5432
COPY target/*.jar application.jar
ENTRYPOINT ["java", "-jar", "application.jar"]

This is the yaml I use to run docker compose up -d

version: '2'

services:
  app:
    image: 'image'
    ports: 
        - "8080:8080"
    container_name: app
    depends_on:
      db:
        condition: service_healthy
    environment:
      - SERVER.PORT=8080
      - SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/testing
      - SPRING_DATASOURCE_USERNAME=postgres
      - SPRING_DATASOURCE_PASSWORD=postgres
      - SPRING_JPA_HIBERNATE_DDL_AUTO=create-drop
          
  db:
    image: 'postgres:13.1-alpine'
    ports:
      - "5432:5432"
    expose: 
      - "5432"
    container_name: db
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_HOST_AUTH_METHOD=trust
      - POSTGRES_DB=testing
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5
  

networks:
  default:
    name: docker

I'm sorry if this code offends anybody. I've made this Frankenstein's monster myself from bits and pieces. However, I can't seem to figure out how to add a working "uploads folder" to it that could be used by the springboot application inside the container. Any help would be appreciated.

view more: ‹ prev next ›