Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
888ca442
Commit
888ca442
authored
Feb 25, 2021
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.4.x'
Closes gh-25441
parents
b36caec4
62737b12
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
246 deletions
+0
-246
Account.java
...e-test-jta-jndi/src/main/java/smoketest/jndi/Account.java
+0
-43
AccountRepository.java
...-jndi/src/main/java/smoketest/jndi/AccountRepository.java
+0
-23
AccountService.java
...jta-jndi/src/main/java/smoketest/jndi/AccountService.java
+0
-45
Messages.java
...-test-jta-jndi/src/main/java/smoketest/jndi/Messages.java
+0
-30
SampleJndiApplication.java
...i/src/main/java/smoketest/jndi/SampleJndiApplication.java
+0
-24
SampleJndiInitializer.java
...i/src/main/java/smoketest/jndi/SampleJndiInitializer.java
+0
-29
WebController.java
...-jta-jndi/src/main/java/smoketest/jndi/WebController.java
+0
-49
application.properties
...e-test-jta-jndi/src/main/resources/application.properties
+0
-3
No files found.
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/Account.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
@Entity
public
class
Account
{
@Id
@GeneratedValue
private
Long
id
;
private
String
username
;
Account
()
{
}
public
Account
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getUsername
()
{
return
this
.
username
;
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/AccountRepository.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
org.springframework.data.repository.CrudRepository
;
public
interface
AccountRepository
extends
CrudRepository
<
Account
,
Long
>
{
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/AccountService.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
org.springframework.jms.core.JmsTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Service
@Transactional
public
class
AccountService
{
private
final
JmsTemplate
jmsTemplate
;
private
final
AccountRepository
accountRepository
;
public
AccountService
(
JmsTemplate
jmsTemplate
,
AccountRepository
accountRepository
)
{
this
.
jmsTemplate
=
jmsTemplate
;
this
.
accountRepository
=
accountRepository
;
}
public
void
createAccountAndNotify
(
String
username
)
{
this
.
jmsTemplate
.
convertAndSend
(
"java:/jms/queue/bootdemo"
,
username
);
Account
entity
=
new
Account
(
username
);
this
.
accountRepository
.
save
(
entity
);
if
(
"error"
.
equals
(
username
))
{
throw
new
RuntimeException
(
"Simulated error"
);
}
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/Messages.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
org.springframework.jms.annotation.JmsListener
;
import
org.springframework.stereotype.Component
;
@Component
public
class
Messages
{
@JmsListener
(
destination
=
"java:/jms/queue/bootdemo"
)
public
void
onMessage
(
String
content
)
{
System
.
out
.
println
(
"----> "
+
content
);
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/SampleJndiApplication.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
SampleJndiApplication
{
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/SampleJndiInitializer.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
public
class
SampleJndiInitializer
extends
SpringBootServletInitializer
{
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
application
)
{
return
application
.
sources
(
SampleJndiApplication
.
class
);
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/java/smoketest/jndi/WebController.java
deleted
100644 → 0
View file @
b36caec4
/*
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
smoketest
.
jndi
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
WebController
{
private
final
AccountService
service
;
private
final
AccountRepository
repository
;
public
WebController
(
AccountService
service
,
AccountRepository
repository
)
{
this
.
service
=
service
;
this
.
repository
=
repository
;
}
@GetMapping
(
"/"
)
public
String
hello
()
{
System
.
out
.
println
(
"Count is "
+
this
.
repository
.
count
());
this
.
service
.
createAccountAndNotify
(
"josh"
);
try
{
this
.
service
.
createAccountAndNotify
(
"error"
);
}
catch
(
Exception
ex
)
{
System
.
out
.
println
(
ex
.
getMessage
());
}
long
count
=
this
.
repository
.
count
();
System
.
out
.
println
(
"Count is "
+
count
);
return
"Count is "
+
count
;
}
}
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-jta-jndi/src/main/resources/application.properties
deleted
100644 → 0
View file @
b36caec4
spring.datasource.jndi-name
=
java:jboss/datasources/bootdemo
spring.jpa.generate-ddl
=
true
spring.jpa.open-in-view
=
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment