Giter Site home page Giter Site logo

full-stack-development-with-spring-boot-3-and-react-fourth-edition's People

Contributors

amishav26 avatar juhahinkula avatar packtanjitha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

full-stack-development-with-spring-boot-3-and-react-fourth-edition's Issues

Problem in Chapter 13

In Chapter 13, After adding the environment variable VITE_API_URL, I changed the Carlist.tsx file as written, after adding the carapi.ts in the api folder. However, the CarResponse object shows an error in the section data.map((car: CarResponse) => of the Carlist.tsx and the site is not working. Kindly help.

Ch03 application.prop file

Got an error when starting mariadb first time with:
spring.jpa.hibernate.ddl-auto=create-drop

java.sql.sqlsyntaxerrorexception: (conn=49) unknown sequence mariadb

Work-around:
Comment out create-drop first time and then put it back once app started.

Missing `@Autowired` annotation on the `configureGlobal` method

I think the configureGlobal method in the SecurityConfig class needs an @Autowired annotation. The code presented in the book still runs, only because the framework is smart enough to adopt the only PasswordEncoder bean available. The configureGlobal method itself without an @Autowired annotation doesn't get executed or do anything at all.

Below is the amended code:

@configuration
@EnableWebSecurity
public class SecurityConfig {
...

@Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
	auth.userDetailsService(userDetailsService).passwordEncoder(new BCryptPasswordEncoder());
}

...

}

unreachable condition in the CarList component

In the React frontend in the CarList.tsx file, we have the following code
...
const { data, error, isSuccess } = useQuery({
queryKey: ["cars"],
queryFn: getCars
});
...
if (!isSuccess) {
return Loading...
}
else if (error) {
return Error when fetching cars...
}
else {
...

However, the else if (error) condition is unreachable, because the (!isSuccess) condition is always met first in the event of errors, effectively shadowing the error condition.

I suggest the following changes:

...
const { data, isSuccess, isError, isLoading } = useQuery({
queryKey: ["cars"],
queryFn: getCars
});
...
if (isLoading) {
return Loading...
}
else if (isError) {
return Error when fetching cars...
}
else if (isSuccess) {
...

Cannot progress further from Chapter 5

I am still getting the error message:-

Error: Full authentication is required to access this resource

I have copied and pasted the entire src folder and changed the password of my database. But it is still not working.

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.