Giter VIP home page Giter VIP logo

gs-relational-data-access's People

Contributors

bclozel avatar btalbott avatar buzzardo avatar cbeams avatar dsyer avatar gregturn avatar habuma avatar joshlong avatar mike706574 avatar mklinkj avatar odrotbohm avatar robertmcnees avatar royclarkson avatar shadowmanos avatar spring-operator 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

gs-relational-data-access's Issues

Autowired issue

Using IntelliJ, the Autowired annotation for the jdbcTemplate variable is labeled as an issue.

...
public static void main(String[] args) {
	SpringApplication.run(SpringjdbcApplication.class, args);
}

@Autowired //Field injection is not recommended
JdbcTemplate jdbcTemplate;

@Override
public void run(String... args) throws Exception {
        log.info("Creating tables");
...

It says that "Field injection is not recommended". How to solve this?

"jdbc:h2:mem" doesn't work with Spring Boot 1.2.0.RC2.

"jdbc:h2:mem" doesn't work with Spring Boot 1.2.0.RC2.

"jdbc:h2:mem" works fine with "com.h2database:h2:1.3.176",

but it doesn't work with "com.h2database:h2:1.4.182".

Spring Boot 1.2.0.RC2 uses "com.h2database:h2:1.4.182".

So I guess "jdbc:h2:mem" needs to be changed to something like "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1".

Cannot find symbol class Customer

I'm new to Java and Spring framework. I tried to build using gradle, but got this error during compilation process.

/home/user/Projects/Java/src/main/java/hello/Application.java:41: error: cannot find symbol
List results = jdbcTemplate.query(
^
symbol: class Customer
location: class Application

I know i'm making some basic mistakes. Please help me fix it.

Where would H2 database store data?

hello, I am confused that would the H2 database disappear after this app finish? Could I store these data in my own computer?

thanks for help!!

Upgrade Spring Boot to the Latest Version

Update the guide to use the most recent Spring Boot version.

Files that require changes are:

initial/build.gradle
initial/pom.xml
complete/build.gradle
complete/pom.xml

H2 dataBase

why don‘t need to configure the h2 username and password?

Function deprecated for "Accessing Relational Data using JDBC with Spring"

Hi,

Description:
For the page "Accessing Relational Data using JDBC with Spring", the method RelationalDataAccessApplication#run call to a deprecated function: jdbcTemplate.query(....

Details:
Deprecated function "query" in JdbcTemplate:

@Deprecated
@Override
public <T> List<T> query(String sql, @Nullable Object[] args, RowMapper<T> rowMapper) throws DataAccessException {
	return result(query(sql, args, new RowMapperResultSetExtractor<>(rowMapper)));
}

The function to call

@Override
public <T> List<T> query(String sql, RowMapper<T> rowMapper, @Nullable Object... args) throws DataAccessException {
	return result(query(sql, args, new RowMapperResultSetExtractor<>(rowMapper)));
}

Fix:
To fix it, we should simply invert the two last param (args and rowmapper).

Regards,
Gilles

RelationalDataAccessApplication has org.springframework.jdbc.BadSqlGrammarException

Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [DROP TABLE customers if exists ]; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'if exists' at line 1

please change Sql spell to "jdbcTemplate.execute("DROP TABLE IF EXISTS customers");"

Unresolved directive in <stdin> on Spring Docs

Hello!
I was reading the guides on spring.io and I notice that the files included in ASCII Doctors are throwing an error and I can't see the code snippet unless I access the file directly here in the repo.

Follow the evidence below:
image

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.