Giter Site home page Giter Site logo

Comments (4)

mhalbritter avatar mhalbritter commented on June 23, 2024

Hello, without more information we unfortunately can't help you.

If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.

from spring-boot.

quangthangit avatar quangthangit commented on June 23, 2024

Xin chào, không có thêm thông tin, rất tiếc chúng tôi không thể giúp bạn.

Nếu bạn muốn chúng tôi dành chút thời gian để điều tra, vui lòng dành thời gian để cung cấp một mẫu tối thiểu hoàn chỉnh (thứ mà chúng tôi có thể giải nén hoặc sao chép git, xây dựng và triển khai) tái tạo vấn đề.

I added and have the library in the project, @getter and @Setter added and there is no error but when running it says there is no getter and setter

from spring-boot.

mhalbritter avatar mhalbritter commented on June 23, 2024

If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.

from spring-boot.

codespearhead avatar codespearhead commented on June 23, 2024

@quangthangit I ran the following and got no errors in the terminal.

#!/bin/bash

mkdir demo \
&& cd demo \
&& curl https://start.spring.io/starter.zip \
    -d type=maven-project \
    -d dependencies=lombok \
    -o demo.zip \
&& unzip demo.zip \
&& rm demo.zip \
&& cat <<EOL > src/main/java/com/example/demo/Person.java
package com.example.demo;

import lombok.Getter;
import lombok.Setter;
import lombok.AllArgsConstructor;

@Getter
@Setter
@AllArgsConstructor
public class Person {
    private String name;
    private int age;
}
EOL

cat <<EOL > src/main/java/com/example/demo/DemoApplication.java
package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
		Person person = new Person("John Doe", 30);
        System.out.println();
		System.out.println("Name: " + person.getName());
		System.out.println("Age: " + person.getAge());
        System.out.println();
	}
}
EOL

./mvnw spring-boot:run
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.3.0)

2024-06-09T18:14:22.195-04:00  INFO 99766 --- [demo] [           main] com.example.demo.DemoApplication         : Starting DemoApplication using Java 21.0.3 with PID 99766 (/home/wsl/projects/deleteme/a/demo/target/classes started by wsl in /home/wsl/projects/deleteme/a/demo)
2024-06-09T18:14:22.198-04:00  INFO 99766 --- [demo] [           main] com.example.demo.DemoApplication         : No active profile set, falling back to 1 default profile: "default"
2024-06-09T18:14:22.934-04:00  INFO 99766 --- [demo] [           main] com.example.demo.DemoApplication         : Started DemoApplication in 1.246 seconds (process running for 1.625)

Name: John Doe
Age: 30

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.204 s
[INFO] Finished at: 2024-06-09T18:14:22-04:00
[INFO] ------------------------------------------------------------------------

from spring-boot.

Related Issues (20)

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.